Re: pgsql: Separate RecoveryConflictReasons from procsignals

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Separate RecoveryConflictReasons from procsignals
Date: 2026-02-10 15:52:16
Message-ID: a6159474-a06b-4874-9e4f-f06516995860@iki.fi
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 10/02/2026 17:19, Bertrand Drouvot wrote:
> Hi,
>
> On Tue, Feb 10, 2026 at 02:32:37PM +0000, Heikki Linnakangas wrote:
>> Separate RecoveryConflictReasons from procsignals
>>
>> Share the same PROCSIG_RECOVERY_CONFLICT flag for all recovery
>> conflict reasons. To distinguish, have a bitmask in PGPROC to indicate
>> the reason(s).
>
> I did not look at the thread, so sorry to be late, but that makes the size of PGPROC
> going from 832 to 840 bytes, so not a multiple of 64 anymore. Is that something
> to worry about? (same kind of discussion in [1]).
>
> [1]: https://postgr.es/m/tw53roer2j4quxh7vlyv62drc5fo6c6zdltvl6d2dttqa62uhi%40stwlpdwlftpj

Right, that's a fair question. I hope the cache line alignment is not
critical for performance, because the alignment is completely accidental
today. I checked the size on different versions:

master: 840 (after this commit)
v18: 832
v17: 888
v14-v16: 880

So v18 was the outlier in that it happened to be 64-byte aligned.

If there's a performance reason to keep have it be aligned - and maybe
there is - we should pad it explicitly.

- Heikki

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2026-02-10 16:41:40 Re: pgsql: Separate RecoveryConflictReasons from procsignals
Previous Message Bertrand Drouvot 2026-02-10 15:19:09 Re: pgsql: Separate RecoveryConflictReasons from procsignals

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2026-02-10 16:29:45 Re: Subquery pull-up increases jointree search space
Previous Message Ashutosh Bapat 2026-02-10 15:40:45 Re: Report bytes and transactions actually sent downtream