Re: Add SPLIT PARTITION/MERGE PARTITIONS commands - Mailing list pgsql-hackers

From Dmitry Koval
Subject Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Date
Msg-id d1e414d0-a072-4be6-8aaf-f0b0770362cd@postgrespro.ru
Whole thread Raw
In response to Re: Add SPLIT PARTITION/MERGE PARTITIONS commands  (Alexander Korotkov <aekorotkov@gmail.com>)
List pgsql-hackers
Hi Alexander!
Thanks for your notes!

1.
 >Why don't you use *existing_relation_id argument of
 >RangeVarGetAndCheckCreationNamespace(), when it is called from
 >createPartitionTable() and ATExecSplitPartition()?  This argument
 >provide an elegant way to find a duplicate table with the same name.

Code changed.

2.
 >It also seems that 0002 patch has the following error message, which
 >aren't experienced in the regression tests.

2a. Added tests for these error messages:
+errmsg("upper bound of partition \"%s\" is not equal to upper bound of 
split partition",
+errmsg("new partition \"%s\" cannot have this value because split 
partition does not have",
+errmsg("DEFAULT partition should be one"),
+errmsg("new partition cannot be DEFAULT because DEFAULT partition 
already exists"),

2b. Tests for these error messages already exists:
+errmsg("new partitions do not have value %s but split partition does",
+errmsg("one partition in the list should be DEFAULT because split 
partition is DEFAULT"),

2c. The error message
+errmsg("can not find partition for split partition row"),
cannot be reproduced using regression tests, because it is issued when
partition contains a record that should not be there (i.e. when the
database is corrupted).

-- 
With best regards,
Dmitry Koval

Postgres Professional: http://postgrespro.com

Attachment

pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: Wrong security context for deferred triggers?
Next
From: Dmitry Koval
Date:
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands