sequencesync worker race with REFRESH SEQUENCES

From: Noah Misch <noah(at)leadboat(dot)com>
To: amit(dot)kapila16(at)gmail(dot)com, vignesh21(at)gmail(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: sequencesync worker race with REFRESH SEQUENCES
Date: 2026-07-10 04:52:17
Message-ID: 20260710045217.f0.noahmisch@microsoft.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

A Fable 5 review of logical replication of sequences found a way to get
subscribed sequences into READY state despite the subscriber side having data
older than the last REFRESH SEQUENCES. I'm attaching the test case it wrote.
I reviewed the test, and I think it identifies a genuine defect.

Fable 5 also wrote a lot more that neither it nor I confirmed by test case
construction. I'm attaching the report; feel free to disregard. Finding-2
about default_transaction_read_only=on looks worth fixing if true, as do
finding-7 assert failure and finding-17 about documenting a PG19+ publisher
requirement. Finding-6, publisher version guard, I'd NOT do or do at warning
level if an older publisher could plausibly work via an extension to provide
the needed function. The other findings are gray areas, perhaps.

Attachment Content-Type Size
test-refresh-race-sequencesync-v0.patch text/plain 10.4 KB
sequence-logrep-defects.md text/plain 52.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2026-07-10 04:52:26 Possible typo in an error message
Previous Message Rui Zhao 2026-07-10 04:36:05 Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements