Hi, Dmitry! On Thu, Apr 11, 2024 at 4:27 PM Dmitry Koval <d.ko...@postgrespro.ru> wrote: > 1. > Alexander Lakhin sent a question about index name after MERGE (partition > name is the same as one of the merged partitions): > > ----start of quote---- > I'm also confused by an index name after MERGE: > CREATE TABLE t (i int) PARTITION BY RANGE (i); > > CREATE TABLE tp_0_1 PARTITION OF t FOR VALUES FROM (0) TO (1); > CREATE TABLE tp_1_2 PARTITION OF t FOR VALUES FROM (1) TO (2); > > CREATE INDEX tidx ON t(i); > ALTER TABLE t MERGE PARTITIONS (tp_1_2, tp_0_1) INTO tp_1_2; > \d+ t* > > Table "public.tp_1_2" > Column | Type | Collation | Nullable | Default | Storage | > Compression | Stats target | Description > --------+---------+-----------+----------+---------+---------+-------------+--------------+------------- > i | integer | | | | plain | > | | > Partition of: t FOR VALUES FROM (0) TO (2) > Partition constraint: ((i IS NOT NULL) AND (i >= 0) AND (i < 2)) > Indexes: > "merge-16385-3A14B2-tmp_i_idx" btree (i) > > Is the name "merge-16385-3A14B2-tmp_i_idx" valid or it's something > temporary? > ----end of quote---- > > Fix for this case added to file > v3-0001-Fix-for-SPLIT-MERGE-partitions-of-temporary-table.patch. > > ---- > > 2. > >It seems to me that v2-0001-Fix-for-SPLIT-MERGE-partitions-of- > >temporary-table.patch is not complete either. > > Added correction (and test), see > v3-0001-Fix-for-SPLIT-MERGE-partitions-of-temporary-table.patch.
Thank you, I'll review this later today. ------ Regards, Alexander Korotkov