pgsql: Revert "Reject concurrent sequence refreshes".

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Revert "Reject concurrent sequence refreshes".
Date: 2026-07-18 02:33:55
Message-ID: E1wkusE-000i9n-1Y@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Revert "Reject concurrent sequence refreshes".

This reverts commit f38afa4abb04e85530c94b88daf11c089375daca.

That commit fixed a race that could leave stale sequence values on the
subscriber after 'ALTER SUBSCRIPTION ... REFRESH SEQUENCES'. It did so by
raising an ERROR during 'ALTER SUBSCRIPTION ... REFRESH SEQUENCES'
whenever a sequence synchronization worker was already running for the
subscription.

That approach caused intermittent buildfarm failures, because the existing
tests did not ensure the sequencesync worker had stopped before executing
'ALTER SUBSCRIPTION ... REFRESH SEQUENCES'. While discussing how to fix
the tests, we concluded that blocking the command while a sequencesync
worker is running is inconvenient for users. So we will fix the original
race differently in a follow-up commit.

Reported-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Author: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Backpatch-through: 19
Discussion: https://postgr.es/m/3614163.1784163070@sss.pgh.pa.us
Discussion: https://postgr.es/m/20260710045217.f0.noahmisch@microsoft.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/dde9a87d4d02a67a5bd459045f03a6f467a00a80

Modified Files
--------------
src/backend/commands/subscriptioncmds.c | 27 ---------------------------
src/test/subscription/t/036_sequences.pl | 4 ----
2 files changed, 31 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Jeff Davis 2026-07-18 16:27:47 pgsql: Fix REASSIGN OWNED for subscriptions in other databases.
Previous Message Jeff Davis 2026-07-17 23:43:12 pgsql: Generate unicode_limits.h.