8000 In pg_upgrade, copy pg_largeobject_metadata and its index for 9.0+ · machack666/postgres@9a22ea2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9a22ea2

Browse files
committed
In pg_upgrade, copy pg_largeobject_metadata and its index for 9.0+
servers because, like pg_largeobject, it is a system table whose contents are not dumped by pg_dump --schema-only.
1 parent 845626f commit 9a22ea2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

contrib/pg_upgrade/info.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,13 +331,16 @@ get_rel_infos(migratorContext *ctx, const DbInfo *dbinfo,
331331
" ) OR ( "
332332
" n.nspname = 'pg_catalog' "
333333
" AND relname IN "
334-
" ('pg_largeobject', 'pg_largeobject_loid_pn_index') )) "
334+
" ('pg_largeobject', 'pg_largeobject_loid_pn_index'%s) )) "
335335
" AND relkind IN ('r','t', 'i'%s)"
336336
"GROUP BY c.oid, n.nspname, c.relname, c.relfilenode,"
337337
" c.reltoastrelid, t.spclocation, "
338338
" n.nspname "
339339
"ORDER BY n.nspname, c.relname;",
340340
FirstNormalObjectId,
341+
/* does pg_largeobject_metadata need to be migrated? */
342+
(GET_MAJOR_VERSION(ctx->old.major_version) <= 804) ?
343+
"" : ", 'pg_largeobject_metadata', 'pg_largeobject_metadata_oid_index'",
341344
/* see the comment at the top of old_8_3_create_sequence_script() */
342345
(GET_MAJOR_VERSION(ctx->old.major_version) <= 803) ?
343346
"" : ", 'S'");

0 commit comments

Comments
 (0)
0