pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Alexander Lakhin <exclusion@gmail.com>
To: Alexander Korotkov <aekorotkov@gmail.com>
To: Dmitry Koval <d.koval@postgrespro.ru>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Date: Sat, 11 May 2024 12:00:00 +0300
Message-ID: <86b4f1e3-0b5d-315c-9225-19860d64d685@gmail.com> (raw )
In-Reply-To: <CAPpHfdtxCwZKA425tWyc7X9gh5ribrNcWXC0Qya5FzMjxXcV0Q@mail.gmail.com >
References: <c73a1746-0cd0-6bdd-6b23-3ae0b7c0c582@postgrespro.ru >
<0f655bcd-6487-4179-f9cf-c248efbad510@gmail.com >
<CAPpHfdv1ZkY9cPOqsLvDY9AA-fCYKHM4P07+-Mu+xq5o=daS6w@mail.gmail.com >
<CA+TgmoYcjL+w2BQzku5iNXKR5fyxJMSP3avQta8xngioTX7D7A@mail.gmail.com >
<e711faa8-826d-434d-b197-ab51da518fe7@postgrespro.ru >
<f79fa76f-de07-b930-0bc7-359d6cbab159@gmail.com >
<b156efc2-5e6d-4eae-8e60-2d483987b42c@postgrespro.ru >
<CAPpHfdv-uR663BO6G2kRuLEQjob+UBHuD3iyXF+qGHXQFRN0-Q@mail.gmail.com >
<56e0000c-6b39-44ce-90b4-d3c3062e408c@postgrespro.ru >
<CAPpHfdvShLh5txtQdh6=ZMCnzGZHv8W+RHAe8pY94rfzghWTAg@mail.gmail.com >
<5dee3937-8e9f-cca4-11fb-737709a92b37@gmail.com >
<f8b5cbf5-965e-4e5b-b506-33bbf41b0d50@postgrespro.ru >
<c45f4c95-0cf7-d0f7-189a-d2d87faec229@gmail.com >
<d95dc63f-e805-44bc-8429-9be423293620@postgrespro.ru >
<8034d1c6-5f0e-e858-9af9-45d5e246515e@gmail.com >
<6bec2319-0722-44c2-9a99-65548d4c8c63@postgrespro.ru >
<CAPpHfdtxCwZKA425tWyc7X9gh5ribrNcWXC0Qya5FzMjxXcV0Q@mail.gmail.com >
Hello Dmitry and Alexander,
Please look at one more anomaly with temporary tables:
CREATE TEMP TABLE t (a int) PARTITION BY RANGE (a);
CREATE TEMP TABLE tp_0 PARTITION OF t FOR VALUES FROM (0) TO (1) ;
CREATE TEMP TABLE tp_1 PARTITION OF t FOR VALUES FROM (1) TO (2);
ALTER TABLE t MERGE PARTITIONS (tp_0, tp_1) INTO tp_0;
-- succeeds, but:
ALTER TABLE t SPLIT PARTITION tp_0 INTO
(PARTITION tp_0 FOR VALUES FROM (0) TO (1), PARTITION tp_1 FOR VALUES FROM (1) TO (2));
-- fails with:
ERROR: relation "tp_0" already exists
Though the same SPLIT succeeds with non-temporary tables...
Best regards,
Alexander
view thread (298+ messages) latest in thread
Message-ID: <86b4f1e3-0b5d-315c-9225-19860d64d685@gmail.com>
Permalink: ../86b4f1e3-0b5d-315c-9225-19860d64d685@gmail.com/
Also on: postgresql.org/message-id/86b4f1e3-0b5d-315c-9225-19860d64d685@gmail.com
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: exclusion@gmail.com, aekorotkov@gmail.com, d.koval@postgrespro.ru, robertmhaas@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
In-Reply-To: <86b4f1e3-0b5d-315c-9225-19860d64d685@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox