Re: [PATCH] Fix stale relation close in sequence synchronization

From: Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com>
To: vignesh C <vignesh21(at)gmail(dot)com>
Cc: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Fix stale relation close in sequence synchronization
Date: 2026-04-28 13:34:52
Message-ID: CAJTYsWXoOWQ9H+nRhm1z1ZP9_6Vtx+KmfsK9DJ7pWi2QN=6ifw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Thanks for reviewing and confirming the issue.

On Tue, 28 Apr 2026 at 18:48, vignesh C <vignesh21(at)gmail(dot)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 Content-Type Size
v3-0001-Fix-stale-relation-close-in-sequence-synchronization.patch application/octet-stream 4.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2026-04-28 14:09:09 Re: [BUG?] macOS (Intel) build warnings: "ranlib: file … has no symbols" for aarch64 objects
Previous Message Tom Lane 2026-04-28 13:29:41 Re: [BUG?] macOS (Intel) build warnings: "ranlib: file … has no symbols" for aarch64 objects