| From: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com> |
|---|---|
| To: | 'Amit Kapila' <amit(dot)kapila16(at)gmail(dot)com> |
| Cc: | vignesh C <vignesh21(at)gmail(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-29 03:05:41 |
| Message-ID: | OS9PR01MB12149BA8F42A6708AB227ADACF5CA2@OS9PR01MB12149.jpnprd01.prod.outlook.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Dear Amit,
> Yes, that is correct. How about a comment as follows:
> /*
> * Lock the sequence so its identity (namespace and name) cannot change
> * under us via a concurrent DROP, RENAME or SET SCHEMA while we read it.
> * The lock is released immediately rather than at transaction end. The
> * later synchronization does not depend on this captured identity
> * remaining valid, as it re-opens the sequence and tolerates concurrent
> * changes. Releasing early also avoids holding one lock per sequence,
> * which could exhaust the lock table.
> */
LGTM.
Best regards,
Hayato Kuroda
FUJITSU LIMITED
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chao Li | 2026-07-29 03:28:10 | Re: tablecmds: fix bug where index rebuild loses replica identity on partitions |
| Previous Message | Hayato Kuroda (Fujitsu) | 2026-07-29 02:46:56 | RE: Bug in ALTER SUBSCRIPTION ... SERVER / ... CONNECTION with broken old server |