]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Revert "Reject concurrent sequence refreshes".
authorAmit Kapila <akapila@postgresql.org>
Sat, 18 Jul 2026 02:23:13 +0000 (07:53 +0530)
committerAmit Kapila <akapila@postgresql.org>
Sat, 18 Jul 2026 02:23:13 +0000 (07:53 +0530)
commitfd27c7e64fe0d5d514ee5fa97250327ce33756fa
tree7077585b13a668a1907e725d8140bca95bcd3544
parent5ed9cee74c6cf23729bd5cc4dee3b0ebbd4aa7aa
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@sss.pgh.pa.us>
Author: Amit Kapila <amit.kapila16@gmail.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
src/backend/commands/subscriptioncmds.c
src/test/subscription/t/036_sequences.pl