From: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com> |
---|---|
To: | 'shveta malik' <shveta(dot)malik(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com> |
Cc: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Euler Taveira <euler(at)eulerto(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org> |
Subject: | RE: Logical Replication of sequences |
Date: | 2025-08-28 08:37:01 |
Message-ID: | OSCPR01MB14966BE96E9A6D1B50DA6C14DF53BA@OSCPR01MB14966.jpnprd01.prod.outlook.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Dear Shveta,
> Say we have triggered REFRESH on sub, and when seq-sync worker is in
> copy_sequences() where it has retrieved the local sequence using
> seqname while it has not locked the sequence-relation yet, if
> meanwhile we alter sequence and change its name, seq-sync worker ends
> up syncing that renamed sequence values with old-fetched sequence.
> Steps:
Personally not sure it should be fixed. IIUC, this could happen because the
sequence sync worker does not handle everything in the one transaction. However,
the transaction would be quite longer if we modify that.
From another perspective... assuming that the sequencesync worker has lock
during the synchronization. In your workload, the ALTER SEQUENCE command would
be delayed till the synchronization is done. In the end, the seq0 is synched
with the pub's seq0 then renamed to seq1 - eventually there are the same result.
Can you clarify if there are other problematic workloads?
Best regards,
Hayato Kuroda
FUJITSU LIMITED
From | Date | Subject | |
---|---|---|---|
Next Message | Kirill Reshke | 2025-08-28 09:11:48 | Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access) |
Previous Message | Kirill Reshke | 2025-08-28 08:36:00 | Re: psql: tab-completion support for COPY ... TO/FROM STDIN, STDOUT, and PROGRAM |