Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

From: Dmitry Koval <d(dot)koval(at)postgrespro(dot)ru>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, vignesh C <vignesh21(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Date: 2024-01-26 17:08:08
Message-ID: 4b9db14c-5367-4357-b2fc-fbd9a08e4c98@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

git format-patch -4 HEAD -v 23

=============================

Thanks!

I excluded regression test "Test: split partition witch identity column"
from script src/test/regress/sql/partition_split.sql because after
commit [1] partitions cannot contain identity columns and queries

CREATE TABLE salesmans2_5(salesman_id INT GENERATED ALWAYS AS IDENTITY
PRIMARY KEY, salesman_name VARCHAR(30));
ALTER TABLE salesmans ATTACH PARTITION salesmans2_5 FOR VALUES FROM (2)
TO (5);

returns

ERROR: table "salesmans2_5" being attached contains an identity column
"salesman_id"
DETAIL: The new partition may not contain an identity column.

[1]
https://github.com/postgres/postgres/commit/699586315704a8268808e3bdba4cb5924a038c49
--
With best regards,
Dmitry Koval

Postgres Professional: http://postgrespro.com

Attachment Content-Type Size
v23-0001-ALTER-TABLE-MERGE-PARTITIONS-command.patch text/plain 104.9 KB
v23-0002-ALTER-TABLE-SPLIT-PARTITION-command.patch text/plain 169.5 KB
v23-0003-Documentation-for-ALTER-TABLE-SPLIT-PARTITION-ME.patch text/plain 9.2 KB
v23-0004-SPLIT-PARTITION-optimization.patch text/plain 42.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2024-01-26 17:15:27 Re: WIP Incremental JSON Parser
Previous Message Melanie Plageman 2024-01-26 17:06:30 Re: Emit fewer vacuum records by reaping removable tuples during pruning