Re: Logical Replication of sequences

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, Shinya Kato <shinya11(dot)kato(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(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>, "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>
Subject: Re: Logical Replication of sequences
Date: 2026-01-19 09:24:34
Message-ID: CALDaNm0FoGdt+1mzua0t-=wYdup5_zmFrvfNf-L=MGBnj9HAcg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 24 Dec 2025 at 12:15, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com> wrote:
>

There is a buildfarm failure in fairywren at [1].
The failure occurs when a sequence is dropped concurrently while
pg_get_sequence_data() is being executed as part of the copy_sequences
query. This can be reproduced by pausing execution inside
pg_get_sequence_data() and dropping the sequence in parallel. In such
a case, the function returns NULL values for last_value, which is not
currently expected by the subscriber side and results in a failure.

I am analyzing this scenario further to identify a proper solution. I
will share the detailed analysis and proposed fix in a subsequent
email.

[1] - https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=fairywren&dt=2026-01-19%2002%3A32%3A40&stg=subscription-check

Regards,
Vignesh

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Dolgov 2026-01-19 09:24:41 Re: [[BUG] pg_stat_statements crashes with var and non-var expressions in IN clause
Previous Message Tatsuro Yamada 2026-01-19 09:22:18 Re: [PATCH] psql: add \dcs to list all constraints