Skip to content

Commit a45beaa

Browse files
committed
Fix for recent pg_upgrade commit to fix large objects relfilenode
handling. (metadata user ids still an open issue).
1 parent b1f2a94 commit a45beaa

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

contrib/pg_upgrade/info.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,33 +47,33 @@ gen_db_file_maps(DbInfo *old_db, DbInfo *new_db,
4747

4848
for (relnum = 0; relnum < old_db->rel_arr.nrels; relnum++)
4949
{
50-
RelInfo *oldrel = &old_db->rel_arr.rels[relnum];
51-
RelInfo *newrel;
50+
RelInfo *old_rel = &old_db->rel_arr.rels[relnum];
51+
RelInfo *new_rel;
5252

5353
/* toast tables are handled by their parents */
54-
if (strcmp(oldrel->nspname, "pg_toast") == 0)
54+
if (strcmp(old_rel->nspname, "pg_toast") == 0)
5555
continue;
5656

57-
newrel = relarr_lookup_rel_name(&old_cluster, &old_db->rel_arr,
58-
oldrel->nspname, oldrel->relname);
57+
new_rel = relarr_lookup_rel_name(&new_cluster, &new_db->rel_arr,
58+
old_rel->nspname, old_rel->relname);
5959

6060
create_rel_filename_map(old_pgdata, new_pgdata, old_db, new_db,
61-
oldrel, newrel, maps + num_maps);
61+
old_rel, new_rel, maps + num_maps);
6262
num_maps++;
6363

6464
/*
6565
* So much for mapping this relation; now we need a mapping
6666
* for its corresponding toast relation and toast index, if any.
6767
*/
68-
if (oldrel->toastrelid > 0)
68+
if (old_rel->toastrelid > 0)
6969
{
7070
char old_name[MAXPGPATH], new_name[MAXPGPATH];
7171
RelInfo *old_toast, *new_toast;
7272

7373
old_toast = relarr_lookup_rel_oid(&old_cluster, &old_db->rel_arr,
74-
oldrel->toastrelid);
74+
old_rel->toastrelid);
7575
new_toast = relarr_lookup_rel_oid(&new_cluster, &new_db->rel_arr,
76-
newrel->toastrelid);
76+
new_rel->toastrelid);
7777

7878
create_rel_filename_map(old_pgdata, new_pgdata, old_db, new_db,
7979
old_toast, new_toast, maps + num_maps);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy