Skip to content

Commit 72b810f

Browse files
committed
resolve cherry-pick issues
1 parent c0d06f5 commit 72b810f

File tree

6 files changed

+7
-26
lines changed

6 files changed

+7
-26
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5445,15 +5445,6 @@ create_ao_relname(char *dst, size_t len, const char *prefix, Oid auxoid)
54455445
fatal("create_ao_relname: destination buffer is too short");
54465446
}
54475447

5448-
static void
5449-
create_ao_idxname(char *dst, size_t len, const char *prefix, Oid auxoid)
5450-
{
5451-
size_t actual = snprintf(dst, len, "%s_%u_index", prefix, auxoid);
5452-
5453-
if (actual >= len)
5454-
fatal("create_ao_idxname: destination buffer is too short");
5455-
}
5456-
54575448
/*
54585449
* GPDB: the implementation of this function has moved below, to
54595450
* binary_upgrade_set_pg_class_oids_impl(), so that we can handle some of the
@@ -5498,9 +5489,7 @@ binary_upgrade_set_pg_class_oids_impl(Archive *fout,
54985489
Oid pg_class_bmidxoid;
54995490
Oid ao_segrelid = InvalidOid;
55005491
Oid ao_blkdirrelid = InvalidOid;
5501-
Oid ao_blkdiridxid = InvalidOid;
55025492
Oid ao_visimaprelid = InvalidOid;
5503-
Oid ao_visimapidxid = InvalidOid;
55045493
bool ao_columnstore = false;
55055494
char pg_class_relkind;
55065495

@@ -5511,8 +5500,8 @@ binary_upgrade_set_pg_class_oids_impl(Archive *fout,
55115500
" i.indexrelid, ti.relname AS tidx_relname, "
55125501
" bi.oid AS bmoid, bidx.oid AS bmidxoid, "
55135502
" pgao.segrelid, pgao.columnstore, "
5514-
" pgao.blkdirrelid, pgao.blkdiridxid, "
5515-
" pgao.visimaprelid, pgao.visimapidxid "
5503+
" pgao.blkdirrelid, "
5504+
" pgao.visimaprelid "
55165505
"FROM pg_catalog.pg_class c "
55175506
"LEFT JOIN pg_catalog.pg_class t ON (c.reltoastrelid = t.oid) "
55185507
"LEFT JOIN pg_catalog.pg_index i ON (c.reltoastrelid = i.indrelid AND i.indisvalid) "
@@ -5551,9 +5540,7 @@ binary_upgrade_set_pg_class_oids_impl(Archive *fout,
55515540
ao_segrelid = atooid(PQgetvalue(upgrade_res, 0, PQfnumber(upgrade_res, "segrelid")));
55525541
ao_columnstore = (PQgetvalue(upgrade_res, 0, PQfnumber(upgrade_res, "columnstore"))[0] == 't');
55535542
ao_blkdirrelid = atooid(PQgetvalue(upgrade_res, 0, PQfnumber(upgrade_res, "blkdirrelid")));
5554-
ao_blkdiridxid = atooid(PQgetvalue(upgrade_res, 0, PQfnumber(upgrade_res, "blkdiridxid")));
55555543
ao_visimaprelid = atooid(PQgetvalue(upgrade_res, 0, PQfnumber(upgrade_res, "visimaprelid")));
5556-
ao_visimapidxid = atooid(PQgetvalue(upgrade_res, 0, PQfnumber(upgrade_res, "visimapidxid")));
55575544
}
55585545

55595546

@@ -5635,17 +5622,11 @@ binary_upgrade_set_pg_class_oids_impl(Archive *fout,
56355622
create_ao_relname(ao_relname, sizeof(ao_relname), "pg_aoblkdir", pg_class_oid);
56365623
binary_upgrade_set_pg_class_oids_for_ao(fout, upgrade_buffer, ao_blkdirrelid, false, ao_relname);
56375624
binary_upgrade_set_type_oids_for_ao(fout, upgrade_buffer, ao_blkdirrelid, ao_relname);
5638-
5639-
create_ao_idxname(ao_relname, sizeof(ao_relname), "pg_aoblkdir", pg_class_oid);
5640-
binary_upgrade_set_pg_class_oids_for_ao(fout, upgrade_buffer, ao_blkdiridxid, true, ao_relname);
56415625
}
56425626

56435627
create_ao_relname(ao_relname, sizeof(ao_relname), "pg_aovisimap", pg_class_oid);
56445628
binary_upgrade_set_pg_class_oids_for_ao(fout, upgrade_buffer, ao_visimaprelid, false, ao_relname);
56455629
binary_upgrade_set_type_oids_for_ao(fout, upgrade_buffer, ao_visimaprelid, ao_relname);
5646-
5647-
create_ao_idxname(ao_relname, sizeof(ao_relname), "pg_aovisimap", pg_class_oid);
5648-
binary_upgrade_set_pg_class_oids_for_ao(fout, upgrade_buffer, ao_visimapidxid, true, ao_relname);
56495630
}
56505631

56515632
PQclear(upgrade_res);

src/test/isolation2/expected/ao_index_build_progress.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ SELECT gp_wait_until_triggered_fault('AppendOnlyStorageRead_ReadNextBlock_succes
110110
1U: SELECT command, phase, ((pg_stat_file(pg_relation_filepath('aoco_index_build_progress') || '.' || 129)).size + (current_setting('block_size')::int - 1)) / current_setting('block_size')::int AS col_j_blocks, blocks_total AS blocks_total_reported, blocks_done AS blocks_done_reported FROM pg_stat_progress_create_index WHERE relid = 'aoco_index_build_progress'::regclass;
111111
command | phase | col_j_blocks | blocks_total_reported | blocks_done_reported
112112
--------------+--------------------------------+--------------+-----------------------+----------------------
113-
CREATE INDEX | building index: scanning table | 8 | 20 | 4
113+
CREATE INDEX | building index: scanning table | 8 | 20 | 3
114114
(1 row)
115115

116116
SELECT gp_inject_fault('AppendOnlyStorageRead_ReadNextBlock_success', 'reset', dbid) FROM gp_segment_configuration WHERE content = 1 AND role = 'p';

src/test/regress/output/uao_ddl/alter_ao_part_tables_splitpartition.source

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pg_class c join pg_namespace n on c.relnamespace = n.oid and
1515
c.relname like 'sto_alt_uao_part_splitpartition%' and
1616
n.nspname = 'alter_ao_part_tables_splitpartition_@amname@');
1717
visimapcount
18-
-------------
18+
--------------
1919
3
2020
(1 row)
2121

src/test/regress/output/uao_ddl/analyze_ao_table_every_dml.source

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ select relname, reltuples from pg_class where oid='sto_uao_city_analyze_everydml
2828
SELECT count(i.indexrelid) = 1 AS VisimapPresent FROM pg_appendonly a, pg_index i WHERE a.visimaprelid = i.indrelid AND
2929
a.relid='sto_uao_city_analyze_everydml'::regclass;
3030
visimappresent
31-
------------
31+
----------------
3232
t
3333
(1 row)
3434

src/test/regress/output/uao_ddl/create_ao_table_500cols.source

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ a498 inet, a499 time, a500 text)
113113
SELECT count(i.indexrelid) = 1 AS VisimapPresent FROM pg_appendonly a, pg_index i WHERE a.visimaprelid = i.indrelid AND
114114
a.relid='sto_uao_500cols'::regclass;
115115
visimappresent
116-
------------
116+
----------------
117117
t
118118
(1 row)
119119

src/test/regress/output/uao_ddl/create_ao_tables.source

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ set gp_select_invisible=false;
292292
SELECT count(i.indexrelid) = 1 AS VisimapPresent FROM pg_appendonly a, pg_index i WHERE a.visimaprelid = i.indrelid AND
293293
a.relid='sto_uao_9'::regclass;
294294
visimappresent
295-
------------
295+
----------------
296296
t
297297
(1 row)
298298

0 commit comments

Comments
 (0)