Hi, Dmitry! On Mon, Apr 15, 2024 at 6:26 PM Dmitry Koval <d.ko...@postgrespro.ru> wrote: > > 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.
Thank you. I've integrated your changes. The revised patchset is attached. 1) I've split the fix for the CommandCounterIncrement() issue and the fix for relation persistence issue into a separate patch. 2) I've validated that the lock on the new partition is held in createPartitionTable() after ProcessUtility() as pointed out by Robert. So, no need to place the lock again. 3) Added fix for problematic error message as a separate patch [1]. 4) Added rename "salemans" => "salesmen" for tests as a separate patch. I think these fixes are reaching committable shape, but I'd like someone to check it before I push. Links. 1. https://postgr.es/m/20240408.152402.1485994009160660141.horikyota.ntt%40gmail.com ------ Regards, Alexander Korotkov
v6-0002-Verify-persistence-of-new-partitions-during-MERGE.patch
Description: Binary data
v6-0004-Grammar-fix-for-tests-of-partition-MERGE-SPLIT-op.patch
Description: Binary data
v6-0003-Fix-error-message-in-check_partition_bounds_for_s.patch
Description: Binary data
v6-0001-Add-missing-CommandCounterIncrement-to-ATExecMerg.patch
Description: Binary data