Skip to content

Commit

Permalink
pg_upgrade: Resolve FIXMEs in pg_upgrade.c and info.c
Browse files Browse the repository at this point in the history
prepare_new_globals() was introduced in b3f8401
which moves handling of database properties from pg_dumpall to pg_dump.

pg_dump handles all properties attached to a single database while
pg_dumpall --globals-only --resource-groups --resource-queues will
dump role, tablespace, resource group, and resource queue related
output.

Restoring the databases is now handled in create_new_objects.

is_appendonly() can be used to determine if a relation is AO.

Authored-by: Brent Doil <[email protected]>
  • Loading branch information
bmdoil authored and reshke committed Jan 29, 2025
1 parent 1ff70b4 commit 26e84a6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
4 changes: 1 addition & 3 deletions src/bin/pg_upgrade/info.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,8 @@ create_rel_filename_map(const char *old_data, const char *new_data,
map->natts = old_rel->natts;
map->type = old_rel->reltype;

#if 0 /* GPDB_12_MERGE_FIXME - replace relstorage check which was removed */
/* An AO table doesn't necessarily have segment 0 at all. */
map->missing_seg0_ok = relstorage_is_ao(old_rel->relstorage);
#endif
map->missing_seg0_ok = is_appendonly(old_rel->relstorage);

/* used only for logging and error reporting, old/new are identical */
map->nspname = old_rel->nspname;
Expand Down
5 changes: 0 additions & 5 deletions src/bin/pg_upgrade/pg_upgrade.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,6 @@ main(int argc, char **argv)

if (is_greenplum_dispatcher_mode())
{
/*
* GPDB_12_MERGE_FIXME: this is where we used to create new databases
* in case we were the dispatcher, now upstream does prepare_new_globals.
* Verify that this replacement is what we want.
*/
prepare_new_globals();

create_new_objects();
Expand Down

0 comments on commit 26e84a6

Please sign in to comment.