Re: [PATCH] Automatic HASH and LIST partition creation

From: Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>
To: Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com>, Rahila Syed <rahilasyed90(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Amul Sul <sulamul(at)gmail(dot)com>
Subject: Re: [PATCH] Automatic HASH and LIST partition creation
Date: 2020-10-06 17:25:48
Message-ID: 6ad2294a-cedc-2f3c-13bd-1ceceb56e4f7@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 06.10.2020 00:21, Pavel Borisov wrote:
> Hi, hackers!
> I added some extra tests for different cases of use of automatic
> partition creation.
> v3-0002 can be applied on top of the original v2 patch for correct
> work with some corner cases with constraints included in this test.
>
Thank you for the tests. I've added them and the fix into the patch.

I also noticed, that some table parameters, such as persistence were not
promoted to auto generated partitions. This is fixed now. The test cases
for temp and unlogged auto partitioned tables are updated respectively.
Besides, I slightly refactored the code and fixed documentation typos,
that were reported by Rahila.

With my recent changes, one test statement, that you've added as
failing, works.

CREATE TABLE list_parted_fail (a int) PARTITION BY LIST (a) CONFIGURATION
(VALUES IN ('1' collate "POSIX"));

It simply ignores collate POSIX part and creates a table with following
structure:

                       Partitioned table "public.list_parted_fail"
 Column |  Type   | Collation | Nullable | Default | Storage | Stats
target | Description
--------+---------+-----------+----------+---------+---------+--------------+-------------
 a      | integer |           |          |         | plain
|              |
Partition key: LIST (a)
Partitions: list_parted_fail_0 FOR VALUES IN (1)

Do you think that it is a bug? For now, I removed this statement from
tests just to calm down the CI.

--
Anastasia Lubennikova
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Attachment Content-Type Size
auto_part_hash_list_v3.patch text/x-patch 54.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2020-10-06 18:27:48 Re: A modest proposal: let's add PID to assertion failure messages
Previous Message Tomas Vondra 2020-10-06 16:51:32 Re: [HACKERS] Custom compression methods