Skip to content

Commit 3302334

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 0857a84 commit 3302334

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
@@ -310,13 +310,16 @@ get_rel_infos(ClusterInfo *cluster, DbInfo *dbinfo)
310310
" ) OR ( "
311311
" n.nspname = 'pg_catalog' "
312312
" AND relname IN "
313-
" ('pg_largeobject', 'pg_largeobject_loid_pn_index') )) "
313+
" ('pg_largeobject', 'pg_largeobject_loid_pn_index'%s) )) "
314314
" AND relkind IN ('r','t', 'i'%s)"
315315
"GROUP BY c.oid, n.nspname, c.relname, c.relfilenode,"
316316
" c.reltoastrelid, t.spclocation, "
317317
" n.nspname "
318318
"ORDER BY t.spclocation, n.nspname, c.relname;",
319319
FirstNormalObjectId,
320+
/* does pg_largeobject_metadata need to be migrated? */
321+
(GET_MAJOR_VERSION(old_cluster.major_version) <= 804) ?
322+
"" : ", 'pg_largeobject_metadata', 'pg_largeobject_metadata_oid_index'",
320323
/* see the comment at the top of old_8_3_create_sequence_script() */
321324
(GET_MAJOR_VERSION(old_cluster.major_version) <= 803) ?
322325
"" : ", 'S'");

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