Re: [PG19] Sequence sync stops when the subscription owner can't SET ROLE to a sequence owner

From: Zhijie Hou <houzhijie22(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>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PG19] Sequence sync stops when the subscription owner can't SET ROLE to a sequence owner
Date: 2026-10-21 06:20:04
Message-ID: CAFvd2n-wOjzpt0cX4k1kpKGjurgm2x8nOiGQgT7zk7YDboYqfA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Wed, Oct 21, 2026 at 1:19 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
> On Tue, 20 Oct 2026 at 19:29, Zhijie Hou <houzhijie22(at)gmail(dot)com> wrote:
> >
> > Agreed. Here is the new version that removes this.
>
> Thanks for the updated patch, the changes look good to me.
> Couple of minor suggestions:
> 1) The test passes without "ALTER SUBSCRIPTION regress_seq_sub REFRESH
> PUBLICATION WITH (copy_data = false);"
> +# Remove the dropped sequence (regress_s2) from the subscription, then disable
> +# the subscription and wait for its workers to stop before changing its
> +# connection and owner.
> +$node_subscriber->safe_psql(
> + 'postgres', qq(
> + ALTER SUBSCRIPTION regress_seq_sub REFRESH PUBLICATION WITH
> (copy_data = false);
>
> Not sure if this is required, even if required can we move this change
> along with the previous test as a test completion or cleanup.

Thanks for the comments.

This cleanup is to prevent the apply worker from repeatedly starting the
sequencesync worker for the missing sequence, which would pollute the logs
and delay the next worker launch. I moved it as suggested and added a brief
comment.

>
> 2) Similarly the test passes without "GRANT CREATE ON DATABASE
> postgres TO regress_seq_sub_owner;", I felt this is not required:

Agreed, this was a copy-paste oversight. Removed.

Attached is the v4 patch.

Best Regards,
Zhijie Hou

Attachment Content-Type Size
v4-0001-Add-error-context-for-sequence-synchronization.patch application/octet-stream 5.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zsolt Parragi 2026-10-21 06:29:07 Re: [PG19] Sequence sync stops when the subscription owner can't SET ROLE to a sequence owner
Previous Message Amit Langote 2026-10-21 06:10:59 Re: Two more RI fast-path issues