Re: Fix bug in multixact Oldest*MXactId initialization and access - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Fix bug in multixact Oldest*MXactId initialization and access
Date
Msg-id c585168a-210a-4728-8e5e-8e9384126ccd@iki.fi
Whole thread Raw
In response to Re: Fix bug in multixact Oldest*MXactId initialization and access  (Chao Li <li.evan.chao@gmail.com>)
Responses Re: Fix bug in multixact Oldest*MXactId initialization and access
List pgsql-hackers
On 02/03/2026 06:08, Chao Li wrote:
>> The comment here:
>>
>> +static inline MultiXactId *
>> +PreparedXactOldestMemberMXactIdSlot(ProcNumber procno)
>> +{
>> +       /*
>> +        * The entries with indexes >= MaxBackends in the OldestMemberMXactId
>> +        * array are reserved for regular backends.
>>
>> should say "array are reserved for prepared transactions"
>>
> 
> +1
> 
> And I saw the other code comment in multixact.c around line 162 needs an update because of this patch:
> ```
> * Per-backend data starts here. We have two arrays stored in the area
> * immediately following the MultiXactStateData struct. Each is indexed by
> * ProcNumber.
> ```
> 
> It says “Each is indexed by ProcNumber”, but it’s no longer accurate for OldestMemberMXactId prepared-xact entries,
whichnow use index (procno - FIRST_PREPARED_XACT_PROC_NUMBER).
 

Fixed those and some other comment work, and pushed. Thanks!

- Heikki




pgsql-hackers by date:

Previous
From: Antonin Houska
Date:
Subject: Re: Adding REPACK [concurrently]
Next
From: Álvaro Herrera
Date:
Subject: Re: [PATCH] psql: tab completion for ALTER ROLE ... IN DATABASE ...