From: | Dmitry Koval <d(dot)koval(at)postgrespro(dot)ru> |
---|---|
To: | Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
Cc: | Alexander Lakhin <exclusion(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Add SPLIT PARTITION/MERGE PARTITIONS commands |
Date: | 2024-04-15 15:26:56 |
Message-ID: | 56e0000c-6b39-44ce-90b4-d3c3062e408c@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi!
> Please, find a my version of this fix attached.
Is it possible to make a small addition to the file v6-0001 ... .patch
(see attachment)?
Most important:
1) Line 19:
+ mergePartName = makeRangeVar(cmd->name->schemaname, tmpRelName, -1);
(temporary table should use the same schema as the partition);
2) Lines 116-123:
+RESET search_path;
+
+-- Can't merge persistent partitions into a temporary partition
+ALTER TABLE t MERGE PARTITIONS (tp_0_1, tp_1_2) INTO pg_temp.tp_0_2;
+
+SET search_path = pg_temp, public;
(Alexandr Lakhin's test for using of pg_temp schema explicitly).
The rest of the changes in v6_afterfix.diff are not very important and
can be ignored.
--
With best regards,
Dmitry Koval
Postgres Professional: http://postgrespro.com
Attachment | Content-Type | Size |
---|---|---|
v6_afterfix.diff | text/plain | 6.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Давыдов Виталий | 2024-04-15 15:31:55 | Re: Slow catchup of 2PC (twophase) transactions on replica in LR |
Previous Message | Alexander Lakhin | 2024-04-15 15:00:00 | Re: Add SPLIT PARTITION/MERGE PARTITIONS commands |