Re: MERGE/SPLIT PARTITIONS issues/questions

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Cc: Alexander Korotkov <aekorotkov(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, jian he <jian(dot)universality(at)gmail(dot)com>
Subject: Re: MERGE/SPLIT PARTITIONS issues/questions
Date: 2026-08-21 13:48:55
Message-ID: CAAKRu_a3sgRfGY6H5dAOWDqNf9uMuBjgGFV27An+YHohZBHBpg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Fri, Aug 21, 2026 at 5:36 AM Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> wrote:
>
> I don't think 0005 is correct. Similar to the other changes, the
> intention should be "do not change the table access method in an
> invisible way to the user".
>
> The current patch still drops explicit table AMs for a partition
> (CREATE TABLE tp PARTITION OF ... USING otheram) in favor of the
> parent AM or even the current session default AM.
> Merge of partitions with different AMs still succeed.
>
> I have to agree with Daniel's reasoning earlier:
>
> > Apart from the obviously dangerous ones like RLS and ACL, silently dropping the
> > table AM may induce side-effects which are hard for us to even reason about
> > since they are external to the core code.
>
> As an example, we have pg_tde which provides an encrypted version of
> the heap AM. Silently changing the table AM in our case means that we
> remove encryption from the data without notifying the user about it.
> We can detect such commands in an event trigger and disable them to
> prevent accidents, but I don't think this should be left to extension
> authors.
>
> > As I mentioned in [1], I think this is the way to save this feature
> > for pg19. I think it's too late to introduce new (and debatable)
> > functionality.
>
> My opinion is that things like silently dropping triggers or default
> values or constraints can result in similar dangerous accidents.

I thought we were going to disallow using merge/split on child
partitions with any differences from the parent partition at all. That
way copying everything from the parent would work fine. That seems
like the way forward to me at this point.

- Melanie

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alexander Korotkov 2026-08-21 14:17:25 Re: MERGE/SPLIT PARTITIONS issues/questions
Previous Message Andres Freund 2026-08-21 12:24:04 Re: BUG #19634: Hash partition with large MODULUS causes "invalid memory alloc request size"

Browse pgsql-hackers by date

  From Date Subject
Next Message Matheus Alcantara 2026-08-21 14:08:08 Re: hashjoins vs. Bloom filters (yet again)
Previous Message Sami Imseih 2026-08-21 13:44:13 Re: postgres_fdw: Fix flaky push down FUNCTION RTE test