| From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
|---|---|
| To: | vignesh C <vignesh21(at)gmail(dot)com> |
| Cc: | shveta malik <shveta(dot)malik(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: sequencesync worker race with REFRESH SEQUENCES |
| Date: | 2026-07-22 10:46:34 |
| Message-ID: | CAA4eK1LwG5rMPiEprQAS0ZsoNMNcnhWy0Aw33k9kv4gPQJtfnQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Jul 22, 2026 at 8:16 AM vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
> The attached patch has the changes for the same. This patch also fixes
> the issue reported by Kuroda-san at [1].
>
The patch used two different error codes
(ERRCODE_FEATURE_NOT_SUPPORTED and
ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE) for the same condition. I
preferred to use ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE in both
places because the error is about the remote server's state (it isn't
new enough), not about a capability this backend fails to implement.
That's exactly what OBJECT_NOT_IN_PREREQUISITE_STATE is for, and it's
what the existing publisher-version guards use. OTOH,
FEATURE_NOT_SUPPORTED reads as "PostgreSQL doesn't implement this" —
misleading here, since sequence sync is implemented; the publisher
just predates it.
I made this change and slightly changed the comments in the patch. See attached.
--
With Regards,
Amit Kapila.
| Attachment | Content-Type | Size |
|---|---|---|
| v6-0001-Reject-sequence-synchronization-against-pre-Postg.patch | application/octet-stream | 5.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2026-07-22 11:08:09 | Re: DOCS: Describe some missing parameters on CREATE/ALTER PUBLICATION pages |
| Previous Message | Rafia Sabih | 2026-07-22 09:47:22 | Re: postgres_fdw: Emit message when batch_size is reduced |