Re: IPC/MultixactCreation on the Standby server

From: Dmitry <dsy(dot)075(at)yandex(dot)ru>
To: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: IPC/MultixactCreation on the Standby server
Date: 2025-06-25 13:44:39
Message-ID: 952926d1-8936-4073-8ed6-07d6315c0f1c@yandex.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 25.06.2025 12:34, Andrey Borodin wrote:
>
>> On 25 Jun 2025, at 11:11, Dmitry <dsy(dot)075(at)yandex(dot)ru> wrote:
>>
>> #6 GetMultiXactIdMembers (multi=45559845, members=0x7ffdaedc84b0, from_pgupgrade=<optimized out>, isLockOnly=<optimized out>)
>> 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 multixact is still being filled in */ is not woken up by ConditionVariableBroadcast(&MultiXactState->nextoff_cv) from WAL redo.
>
> 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 sleep so 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shlok Kyal 2025-06-25 14:12:25 Re: Logical Replication of sequences
Previous Message Dean Rasheed 2025-06-25 13:41:59 Re: Adding OLD/NEW support to RETURNING