Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
От | Alexander Korotkov |
---|---|
Тема | Re: Add SPLIT PARTITION/MERGE PARTITIONS commands |
Дата | |
Msg-id | CAPpHfdtYgQ8PUZMS043c8USeKcKh5isrAW0QQKMAxQacX-+nuA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Add SPLIT PARTITION/MERGE PARTITIONS commands (Dmitry Koval <d.koval@postgrespro.ru>) |
Ответы |
Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
|
Список | pgsql-hackers |
On Fri, Aug 9, 2024 at 10:18 AM Dmitry Koval <d.koval@postgrespro.ru> wrote: > > 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 very much for information (especially for the demo)! > > I'm not sure that we can get the identifier of the newly created > partition from the ProcessUtility() function... > Maybe it would be enough to check that the new partition is located in > the namespace in which we created it (see attachment)? The new partition doesn't necessarily get created in the same namespace as parent partition. I think it would be better to somehow open partition by its oid. It would be quite unfortunate to replicate significant part of ProcessUtilitySlow(). So, the question is how to get the oid of newly created relation from ProcessUtility(). I don't like to change the signature of ProcessUtility() especially as a part of backpatch. So, I tried to fit this into existing parameters. Probably QueryCompletion struct fits this purpose best from the existing parameters. Attached draft patch implements returning oid of newly created relation as part of QueryCompletion. Thoughts? ------ Regards, Alexander Korotkov Supabase
Вложения
В списке pgsql-hackers по дате отправления: