Re: IPC/MultixactCreation on the Standby server - Mailing list pgsql-hackers

From Dmitry
Subject Re: IPC/MultixactCreation on the Standby server
Date
Msg-id 952926d1-8936-4073-8ed6-07d6315c0f1c@yandex.ru
Whole thread Raw
In response to IPC/MultixactCreation on the Standby server  (Dmitry <dsy.075@yandex.ru>)
Responses Re: IPC/MultixactCreation on the Standby server
List pgsql-hackers
On 25.06.2025 12:34, Andrey Borodin wrote:
>
>> On 25 Jun 2025, at 11:11, Dmitry <dsy.075@yandex.ru> wrote:
>>
>>      #6  GetMultiXactIdMembers (multi=45559845, members=0x7ffdaedc84b0, from_pgupgrade=<optimized out>,
isLockOnly=<optimizedout>)
 
>>          at /usr/src/postgresql-17-17.5-1.pgdg24.04+1/build/../src/backend/access/transam/multixact.c:1483
> Hi Dmitry!
>
> This looks to be related to work in my thread about multixacts [0]. Seems like CV sleep in /* Corner case 2: next
multixactis still being filled in */ is not woken up by ConditionVariableBroadcast(&MultiXactState->nextoff_cv) from
WALredo.
 
>
> If so - any subsequent multixact redo from WAL should unstuck reading last MultiXact.
>
> Either way redo path might be not going through ConditionVariableBroadcast(). I will investigate this further.
>
>
> Can you please check your reproduction with patch attached to this message? This patch simply adds timeout on CV
sleepso in worst case we will fallback to behavior of PG 16.
 
>
>
> Best regards, Andrey Borodin.

Hi Andrey!

Thanks so much for your response.

A small comment on /* Corner case 2: ... */
At this point in the code, I tried to set trace points by outputting 
messages through `elog()`,
and I can say that the process does not always stuck in this part of the 
code, it appears from time to time and in an unpredictable way.

Maybe this will help you a little.

To be honest, PostgreSQL performance is much better with this feature, 
it would be a shame if we had to rollback to the behavior in version 16.

I will definitely try to reproduce the problem with your patch.

Best regards,
Dmitry.




pgsql-hackers by date:

Previous
From: Sergey Shinderuk
Date:
Subject: Re: Read-Write optimistic lock (Re: sinvaladt.c: remove msgnumLock, use atomic operations on maxMsgNum)
Next
From: Shlok Kyal
Date:
Subject: Re: Logical Replication of sequences