Re: GetBufferDescriptor() being called for local buffers from MarkBufferDirtyHint()

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: GetBufferDescriptor() being called for local buffers from MarkBufferDirtyHint()
Date: 2026-06-10 22:14:33
Message-ID: ainhybfghL6I5Ek2@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jun 10, 2026 at 10:36:22AM -0400, Andres Freund wrote:
> I think it *should* blow up. It doesn't because we're lacking assertions in
> GetBufferDescriptor(). But I don't think the assertions added in the patch are
> quite right.
>
> We can't trivially add the correct assertions, because somebody though it was
> a good idea to give GetBufferDescriptor() a uint32 parameter, which seems
> completely wrong to me.

This one is not as old as I expected: 3ac88fddd92c. You're right that
switching that to be signed would be a correct first step forward.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2026-06-10 22:17:26 Re: Fix unqualified catalog references in psql describe queries
Previous Message Sami Imseih 2026-06-10 21:32:32 Re: [PATCH v5] pg_stat_statements: Add last_execution_start column