Re: [PATCH] Fix stale relation close in sequence synchronization - Mailing list pgsql-hackers

From Ayush Tiwari
Subject Re: [PATCH] Fix stale relation close in sequence synchronization
Date
Msg-id CAJTYsWXoOWQ9H+nRhm1z1ZP9_6Vtx+KmfsK9DJ7pWi2QN=6ifw@mail.gmail.com
Whole thread
In response to Re: [PATCH] Fix stale relation close in sequence synchronization  (vignesh C <vignesh21@gmail.com>)
List pgsql-hackers
Hi,

Thanks for reviewing and confirming the issue. 

On Tue, 28 Apr 2026 at 18:48, vignesh C <vignesh21@gmail.com> wrote:

Thanks for finding and reporting the issue. I was able to reproduce
the issue with the steps you provided.
Few comments:
1) Here "SELECT nextval('regress_no_select');" and "REVOKE ALL ON
SEQUENCE regress_no_select FROM PUBLIC;" is not required for this test
case:
+$node_publisher->safe_psql(
+ 'postgres', qq(
+ CREATE ROLE regress_seq_repl LOGIN REPLICATION;
+ CREATE SEQUENCE regress_no_select;
+ SELECT nextval('regress_no_select');
+ GRANT USAGE ON SCHEMA public TO regress_seq_repl;
+ GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO regress_seq_repl;
+ REVOKE ALL ON SEQUENCE regress_no_select FROM PUBLIC;
+ REVOKE ALL ON SEQUENCE regress_no_select FROM regress_seq_repl;
+));

Agreed. Removed both statements from the test.


2) Since the comment about “dropped concurrently” has been removed,
could you merge that context into the new wording:

Done. The comment now mentions both insufficient privileges and
concurrent drops.
 

3) Can we change this:
##########
# A NULL sequence data row from the publisher must not make the subscriber
# close the previously synchronized sequence relation again.
##########

To something like:
##########
# Ensure that insufficient privileges on the publisher for a sequence
# do not disrupt the subscriber. The subscriber should log a warning
# and continue retrying.
##########

Done. I used that wording for the TAP test block comment. 

Attached is v3 with these changes.

Regards,
Ayush
Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [BUG?] macOS (Intel) build warnings: "ranlib: file … has no symbols" for aarch64 objects
Next
From: Nathan Bossart
Date:
Subject: Re: [BUG?] macOS (Intel) build warnings: "ranlib: file … has no symbols" for aarch64 objects