Re: sequencesync worker race with REFRESH SEQUENCES

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>, Noah Misch <noah(at)leadboat(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: sequencesync worker race with REFRESH SEQUENCES
Date: 2026-07-14 04:54:54
Message-ID: CAA4eK1Kf9kRm+T8DvkgeiPt6Az7=TBwWJgZ+3UfUEz9q9CDQeA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jul 13, 2026 at 4:38 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
>

Comments on 0002:
================
*
/*
- * Sequence synchronization relies on pg_get_sequence_data(), which
- * is only available since PostgreSQL 19. Fail immediately with a
- * clear diagnosis instead of resetting the sequences to INIT state
- * and letting a sequencesync worker repeatedly fail trying to fetch
+ * Sequence synchronization relies on pg_get_sequence_data(), which is
+ * only available since PostgreSQL 19. Fail immediately with a clear
+ * diagnosis instead of resetting the sequences to INIT state and
+ * letting a sequencesync worker repeatedly fail trying to fetch
* sequence data with a query that can never succeed against this

This change doesn't seem to belong to this patch.

*
+ ereport(ERROR,
+ errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
+ errmsg("cannot execute %s while a sequence synchronization worker
for subscription \"%s\" is still running",
+ "ALTER SUBSCRIPTION ... REFRESH SEQUENCES",

How about a slightly shorter message like: "cannot execute %s while a
sequence synchronization worker is running"?

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Arne Roland 2026-07-14 04:55:26 Re: Key joins
Previous Message Suraj Kharage 2026-07-14 04:38:59 Re: [PATCH] Add support for INSERT ... SET syntax