Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: Dmitry Koval <d(dot)koval(at)postgrespro(dot)ru>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Date: 2024-08-08 22:43:11
Message-ID: CAPpHfdtgj4+QO2AuA144XxFgD1TkUDTx+ssL5euBt83knaygjg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 8, 2024 at 8:14 PM Noah Misch <noah(at)leadboat(dot)com> wrote:
> On Sun, Apr 07, 2024 at 01:22:51AM +0300, Alexander Korotkov wrote:
> > I've pushed 0001 and 0002
>
> The partition MERGE (1adf16b8f) and SPLIT (87c21bb94) v17 patches introduced
> createPartitionTable() with this code:
>
> createStmt->relation = newPartName;
> ...
> wrapper->utilityStmt = (Node *) createStmt;
> ...
> ProcessUtility(wrapper,
> ...
> newRel = table_openrv(newPartName, NoLock);
>
> This breaks from the CVE-2014-0062 (commit 5f17304) principle of not repeating
> name lookups. The attached demo uses this defect to make one partition have
> two parents.

Thank you for a valuable report. I will dig into and fix that.

------
Regards,
Alexander Korotkov
Supabase

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2024-08-09 00:20:43 Re: Logical Replication of sequences
Previous Message Jeff Davis 2024-08-08 22:38:09 Re: tiny step toward threading: reduce dependence on setlocale()