On 2/20/18, Michael Paquier <[email protected]> wrote:
> Regression tests of pg_upgrade are failing as follows:
> New cluster database "postgres" is not empty
> Failure, exiting
> + rm -rf /tmp/pg_upgrade_check-Xn0ZLe
I looked into this briefly. The error comes from
check_new_cluster_is_empty() in src/bin/pg_upgrade/check.c, which
contains the comment
/* pg_largeobject and its index should be skipped */
If you don't create a toast table for pg_largeobject and
pg_largeobject_metadata, the pg_upgrade regression test passes.
Revised addendum attached. Adding two more exceptions to my alternate
implementation starts to make it ugly, so I haven't updated it for
now.
-John Naylor
> Michael
>
diff --git a/src/include/catalog/toasting.h b/src/include/catalog/toasting.h
index ee54487..f259890 100644
--- a/src/include/catalog/toasting.h
+++ b/src/include/catalog/toasting.h
@@ -46,9 +46,9 @@ extern void BootstrapToastTable(char *relName,
*/
/* normal catalogs */
-DECLARE_TOAST(pg_aggregate, 4139, 4140);
+DECLARE_TOAST(pg_aggregate, 4159, 4160);
DECLARE_TOAST(pg_attrdef, 2830, 2831);
-DECLARE_TOAST(pg_collation, 4141, 4142);
+DECLARE_TOAST(pg_collation, 4161, 4162);
DECLARE_TOAST(pg_constraint, 2832, 2833);
DECLARE_TOAST(pg_default_acl, 4143, 4144);
DECLARE_TOAST(pg_description, 2834, 2835);
@@ -59,8 +59,6 @@ DECLARE_TOAST(pg_foreign_server, 4151, 4152);
DECLARE_TOAST(pg_foreign_table, 4153, 4154);
DECLARE_TOAST(pg_init_privs, 4155, 4156);
DECLARE_TOAST(pg_language, 4157, 4158);
-DECLARE_TOAST(pg_largeobject, 4159, 4160);
-DECLARE_TOAST(pg_largeobject_metadata, 4161, 4162);
DECLARE_TOAST(pg_namespace, 4163, 4164);
DECLARE_TOAST(pg_partitioned_table, 4165, 4166);
DECLARE_TOAST(pg_policy, 4167, 4168);
diff --git a/src/test/regress/expected/misc_sanity.out
b/src/test/regress/expected/misc_sanity.out
index 0be74d2..a6dacd4 100644
--- a/src/test/regress/expected/misc_sanity.out
+++ b/src/test/regress/expected/misc_sanity.out
@@ -88,15 +88,18 @@ WHERE c.oid < 16384 AND
relkind = 'r' AND
attstorage != 'p'
ORDER BY 1,2;
- relname | attname | atttypid
---------------+---------------+--------------
- pg_attribute | attacl | aclitem[]
- pg_attribute | attfdwoptions | text[]
- pg_attribute | attoptions | text[]
- pg_class | relacl | aclitem[]
- pg_class | reloptions | text[]
- pg_class | relpartbound | pg_node_tree
- pg_index | indexprs | pg_node_tree
- pg_index | indpred | pg_node_tree
-(8 rows)
+ relname | attname | atttypid
+-------------------------+---------------+--------------
+ pg_attribute | attacl | aclitem[]
+ pg_attribute | attfdwoptions | text[]
+ pg_attribute | attmissingval | anyarray
+ pg_attribute | attoptions | text[]
+ pg_class | relacl | aclitem[]
+ pg_class | reloptions | text[]
+ pg_class | relpartbound | pg_node_tree
+ pg_index | indexprs | pg_node_tree
+ pg_index | indpred | pg_node_tree
+ pg_largeobject | data | bytea
+ pg_largeobject_metadata | lomacl | aclitem[]
+(11 rows)