Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2022-07-14 Thread Alvaro Herrera
This is not a review, but I think the isolation tests should be expanded. At least, include the case of serializable transactions being involved. -- Álvaro HerreraBreisgau, Deutschland — https://www.EnterpriseDB.com/ "Pensar que el espectro que vemos es ilusorio no lo despoja de

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2022-07-13 Thread Zhihong Yu
On Wed, Jul 13, 2022 at 1:05 PM Dmitry Koval wrote: > Thanks you! > I've fixed all things mentioned. > > -- > With best regards, > Dmitry Koval > > Postgres Professional: http://postgrespro.com Hi, Toward the end of ATExecSplitPartition(): + /* Unlock new partition. */ +

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2022-07-13 Thread Zhihong Yu
On Wed, Jul 13, 2022 at 11:28 AM Dmitry Koval wrote: > Hi! > > Patch stop applying due to changes in upstream. > Here is a rebased version. > > -- > With best regards, > Dmitry Koval > > Postgres Professional: http://postgrespro.com Hi, +attachPartTable(List **wqueue, Relation rel, Relation

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2022-06-01 Thread Zhihong Yu
On Wed, Jun 1, 2022 at 11:58 AM Dmitry Koval wrote: > Hi, > > 1) > > For attachPartTable, the parameter wqueue is missing from comment. > > The parameters of CloneRowTriggersToPartition are called parent and > partition. > > I think it is better to name the parameters to attachPartTable in a >

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2022-05-31 Thread Zhihong Yu
On Tue, May 31, 2022 at 1:43 PM Zhihong Yu wrote: > > > On Tue, May 31, 2022 at 12:43 PM Dmitry Koval > wrote: > >> >Just out of curiosity, why is SPLIT / MERGE support not included for >> >HASH partitions? Because sibling partitions can have a different >> >modulus, you should be able to

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2022-05-31 Thread Zhihong Yu
On Tue, May 31, 2022 at 12:43 PM Dmitry Koval wrote: > >Just out of curiosity, why is SPLIT / MERGE support not included for > >HASH partitions? Because sibling partitions can have a different > >modulus, you should be able to e.g. split a partition with (modulus, > >remainder) of (3, 1)

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2022-05-31 Thread Dmitry Koval
I didn't read the patch, but what lock level does that place on the partitioned table? Anything more than ACCESS SHARE? Current patch locks a partitioned table with ACCESS EXCLUSIVE lock. Unfortunately only this lock guarantees that other session can not work with partitions that are

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2022-05-31 Thread Laurenz Albe
On Tue, 2022-05-31 at 12:32 +0300, Dmitry Koval wrote: > There are not many commands in PostgreSQL for working with partitioned > tables. This is an obstacle to their widespread use. > Adding SPLIT PARTITION/MERGE PARTITIONS operations can make easier to > use partitioned tables in PostgreSQL. >

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2022-05-31 Thread Matthias van de Meent
On Tue, 31 May 2022 at 11:33, Dmitry Koval wrote: > > Hi, hackers! > > There are not many commands in PostgreSQL for working with partitioned > tables. This is an obstacle to their widespread use. > Adding SPLIT PARTITION/MERGE PARTITIONS operations can make easier to > use partitioned tables in

<    1   2