| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | Alvaro Herrera <alvherre(at)kurilemu(dot)de> |
| Cc: | shihao zhong <zhong950419(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Partitioned index marked valid while a partition is pending detach |
| Date: | 2026-11-06 01:58:41 |
| Message-ID: | au00USIMHPF-F7Qr@paquier.xyz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Nov 05, 2026 at 09:05:52AM +0100, Alvaro Herrera wrote:
> I think this idea is good generally speaking, but we shouldn't limit it
> to create index, but instead apply it to pretty much any DDL that you
> want to run on such a table. The risk of inconsistencies is just too
> high and there's no functional reason to let users do anything before
> finishing that detach.
Yeah, I'd suspect that we have more cases like this one, so a more
common water-proof approach could be adapted so as all current DDLs
don't silently fail while future DDLs don't fall into this trap.
It also sounds to me that changing only validatePartitionedIndex() is
not the thing we should do, as we're only taking care of one code
path. Perhaps we should try to work around simplifying
RelationGetPartitionDesc() instead, and try to get rid of the
omit_detached idea entirely?
--
Michael
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Grigorev Jurij | 2026-11-06 02:11:36 | Re: Re: [PATCH] Fix use-after-free after failed pg_checksum_init |
| Previous Message | Michael Paquier | 2026-11-06 01:53:30 | Re: Code-comment typos. |