Re: MERGE PARTITIONS and DEPENDS ON EXTENSION.
Matheus Alcantara <matheusssilv97@gmail.com>
From: "Matheus Alcantara" <matheusssilv97@gmail.com>
To: "Alexander Korotkov" <aekorotkov@gmail.com>
Cc: "Dmitry Koval" <d.koval@postgrespro.ru>, "pgsql-hackers"
<pgsql-hackers@postgresql.org>
Date: 2026-04-21T13:20:50Z
Lists: pgsql-hackers
Attachments
- v5-0001-Preserve-extension-dependencies-on-indexes-during.patch (text/plain) patch v5-0001
On Mon Apr 20, 2026 at 4:08 PM -03, Alexander Korotkov wrote: > On Thu, Apr 16, 2026 at 9:03 PM Matheus Alcantara > <matheusssilv97@gmail.com> wrote: >> >> On Tue Apr 14, 2026 at 6:05 AM -03, Dmitry Koval wrote: >> > Hi Matheus! >> > >> > Thank you for patch. >> > I agree that dependency should be automatically added for SPLIT >> > PARTITION. But I'm not sure about MERGE PARTITION ... >> > Might be it would be more correct to automatically add a dependency only >> > if all merged partitions have it? >> >> Hi, >> >> Thank you for taking a look on this! >> >> I agree with your suggestion. The attached patch implements the >> intersection behavior for MERGE PARTITIONS: extension dependencies are >> only preserved on the merged partition's index if all source partition >> indexes have that dependency. >> >> For example: >> MERGE(idx1(ext_a, ext_b), idx2(ext_a)) -> idx3(ext_a) -- only ext_a is common >> MERGE(idx1(ext_a), idx2()) -> idx3() -- no common deps > > This is not obvious for me. I would rather trigger an error if there > are different dependencies on merging partitions. > Yeah, I agree that this sounds a bit confusing, although this behavior is documented on the last patch version I think that raising an error is more simple and maybe is more obvious. The attached patch implement this. -- Matheus Alcantara EDB: https://www.enterprisedb.com
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Preserve extension dependencies on indexes during partition merge/split
- 713e553e3213 19 (unreleased) landed