| From: | Andrey Rachitskiy <pl0h0yp1(at)gmail(dot)com> |
|---|---|
| To: | 1548140642(at)qq(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Cc: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
| Subject: | Re: BUG #19884: pg_publication_tables omits a detach-pending partition in root mode |
| Date: | 2026-11-12 21:45:43 |
| Message-ID: | CAB8bMiuBBi-p6FyO8vobTGSqrnx=y1_d5BmY9XSO6vKafLMnng@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
чт, 12 нояб. 2026 г. в 22:16, PG Bug reporting form <noreply(at)postgresql(dot)org
>:
> The following bug has been logged on the website:
>
> Bug reference: 19884
> Logged by: Milo
> Email address: 1548140642(at)qq(dot)com
> PostgreSQL version: 18.6
> Operating system: Linux/amd64
> Description:
>
> After phase one of ALTER TABLE ... DETACH PARTITION CONCURRENTLY,
> pg_publication_tables omits the detach-pending child from an ALL TABLES
> publication when publish_via_partition_root is enabled. At that point the
> child has no ancestors and is treated as a standalone relation for
> publication purposes, so it should appear in the view. The query instead
> returns zero rows.
>
>
>
Hi Milo!
Thanks for the report.
I was also able to reproduce the problem on the master branch.
I think we can fix this by using get_partition_ancestors() in
pg_get_publication_tables().
After the pending detach commits, that list is empty, so the table stays in
the publication.
Patch in attachment.
Sawada-san in CC
--
Regards,
Rachitskiy Andrey
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Fix-publication-membership-of-a-partition-pending-de.patch | text/x-patch | 6.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Manu | 2026-11-12 23:00:40 | Re: BUG #19602: Vuln46: citext split_part silently returns NULL for a zero field position instead of raising core sp |
| Previous Message | Narayanan Venkateswaran | 2026-11-12 21:34:49 | Re: BUG #19800: Wrong results: self-join elimination drops an ORDER BY sort key with GROUPING SETS / CUBE / ROLLUP |