Re: sequencesync worker race with REFRESH SEQUENCES

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: vignesh C <vignesh21(at)gmail(dot)com>
Cc: Noah Misch <noah(at)leadboat(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: sequencesync worker race with REFRESH SEQUENCES
Date: 2026-07-16 02:58:28
Message-ID: 3621808.1784170708@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

vignesh C <vignesh21(at)gmail(dot)com> writes:
> On Thu, 16 Jul 2026 at 06:21, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> That is, after checking for the "insufficient privileges" case,
>> we aren't waiting long enough for the new seqsync worker to quiesce.
>> This wasn't a problem before f38afa4ab, because it wasn't an error
>> condition for that worker to still be running.

> I think we can simply remove the REFRESH SEQUENCES command and add a
> comment explaining that the sequence synchronization worker is
> restarted automatically while there are sequences that are not yet in
> the READY state.

Well, that would fix this test, but I wonder if this result isn't
telling us that f38afa4ab has created a failure condition that will
bite real users. Why would the user issuing REFRESH SEQUENCES be
aware of whether there's a sync worker running right then? Why
should it be his problem to avoid that?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2026-07-16 04:04:38 Re: pgstat: add pgstat_prep_pending() for entry ref pending setup
Previous Message Fujii Masao 2026-07-16 02:53:08 Re: analyze-in-stages post upgrade questions