aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2011-01-04 23:35:52 -0500
committerBruce Momjian <bruce@momjian.us>2011-01-04 23:35:52 -0500
commit9a22ea242b276c9bc1f3eb94f0ce9ffad94e270e (patch)
treee27d2079f80d318552b8bd043a3cc0215c51199a
parent845626f506df0518829fe519977f42e02d9c8438 (diff)
downloadpostgresql-9a22ea242b276c9bc1f3eb94f0ce9ffad94e270e.tar.gz
postgresql-9a22ea242b276c9bc1f3eb94f0ce9ffad94e270e.zip
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.
-rw-r--r--contrib/pg_upgrade/info.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/pg_upgrade/info.c b/contrib/pg_upgrade/info.c
index 33ff52c6858..567c64e8b82 100644
--- a/contrib/pg_upgrade/info.c
+++ b/contrib/pg_upgrade/info.c
@@ -331,13 +331,16 @@ get_rel_infos(migratorContext *ctx, const DbInfo *dbinfo,
" ) OR ( "
" n.nspname = 'pg_catalog' "
" AND relname IN "
- " ('pg_largeobject', 'pg_largeobject_loid_pn_index') )) "
+ " ('pg_largeobject', 'pg_largeobject_loid_pn_index'%s) )) "
" AND relkind IN ('r','t', 'i'%s)"
"GROUP BY c.oid, n.nspname, c.relname, c.relfilenode,"
" c.reltoastrelid, t.spclocation, "
" n.nspname "
"ORDER BY n.nspname, c.relname;",
FirstNormalObjectId,
+ /* does pg_largeobject_metadata need to be migrated? */
+ (GET_MAJOR_VERSION(ctx->old.major_version) <= 804) ?
+ "" : ", 'pg_largeobject_metadata', 'pg_largeobject_metadata_oid_index'",
/* see the comment at the top of old_8_3_create_sequence_script() */
(GET_MAJOR_VERSION(ctx->old.major_version) <= 803) ?
"" : ", 'S'");