RE: MERGE/SPLIT PARTITIONS issues/questions

From: "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>
To: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
Cc: Melanie Plageman <melanieplageman(at)gmail(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, jian he <jian(dot)universality(at)gmail(dot)com>
Subject: RE: MERGE/SPLIT PARTITIONS issues/questions
Date: 2026-08-23 06:37:17
Message-ID: TY4PR01MB1771805D451EAA86F918166B894A12@TY4PR01MB17718.jpnprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Hi,

On Thursday, August 20, 2026 8:46 PM Alexander Korotkov <aekorotkov(at)gmail(dot)com> wrote:
>
> Added as 0005 patch to the patchset.
>

I took a look at 0001 and 0002.

0001 looks OK to me.

For 0002, I think we should also disallow the command when the partition is
explicitly listed in the publication's EXCEPT TABLE list. Otherwise, changes on
partitions that were previously ignored would start being replicated after
splitting (or merging), which could be unexpected.

BTW, this patch also disallows SPLIT/MERGE when both the parent and child tables
are explicitly added to a publication. That case is actually safe, since
publishing the parent already covers the partition. But if the intent is to keep
the check simple and avoid adding complexity for this infrequent case, I think
that's acceptable - though it might be worth adding a comment to explain the
reasoning.

Best Regards,
Zhijie Hou

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Zhijie Hou (Fujitsu) 2026-08-23 09:17:33 RE: MERGE/SPLIT PARTITIONS issues/questions
Previous Message Peter Geoghegan 2026-08-22 20:29:48 Re: BTree index corruption (heap-tid-past-end, unexpected zero page, misplaced TID in posting list) recurring on high-churn tables, PG 18.3, data_checksums=on, no preceding crash

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhijie Hou (Fujitsu) 2026-08-23 08:15:36 RE: Proposal: Conflict log history table for Logical Replication
Previous Message Bernd Reiß 2026-08-23 06:31:56 Re: missing possibility to use alternative translated month names in to_char function