RE: Logical Replication of sequences

Поиск
Список
Период
Сортировка
От Hayato Kuroda (Fujitsu)
Тема RE: Logical Replication of sequences
Дата
Msg-id OSCPR01MB14966BE96E9A6D1B50DA6C14DF53BA@OSCPR01MB14966.jpnprd01.prod.outlook.com
обсуждение исходный текст
Ответ на Re: Logical Replication of sequences  (shveta malik <shveta.malik@gmail.com>)
Список 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


В списке pgsql-hackers по дате отправления: