Skip to content

Commit 0e8f6bf

Browse files
committed
In pg_upgrade, allow tables using regclass to be upgraded because we
preserve pg_class oids since PG 9.0.
1 parent ff68b25 commit 0e8f6bf

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

contrib/pg_upgrade/check.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -611,11 +611,11 @@ check_for_isn_and_int8_passing_mismatch(ClusterInfo *cluster)
611611
/*
612612
* check_for_reg_data_type_usage()
613613
* pg_upgrade only preserves these system values:
614-
* pg_class.relfilenode
614+
* pg_class.oid
615615
* pg_type.oid
616616
* pg_enum.oid
617617
*
618-
* Most of the reg* data types reference system catalog info that is
618+
* Many of the reg* data types reference system catalog info that is
619619
* not preserved, and hence these data types cannot be used in user
620620
* tables upgraded by pg_upgrade.
621621
*/
@@ -653,16 +653,16 @@ check_for_reg_data_type_usage(ClusterInfo *cluster)
653653
" NOT a.attisdropped AND "
654654
" a.atttypid IN ( "
655655
" 'pg_catalog.regproc'::pg_catalog.regtype, "
656-
" 'pg_catalog.regprocedure'::pg_catalog.regtype, "
656+
" 'pg_catalog.regprocedure'::pg_catalog.regtype, "
657657
" 'pg_catalog.regoper'::pg_catalog.regtype, "
658-
" 'pg_catalog.regoperator'::pg_catalog.regtype, "
659-
" 'pg_catalog.regclass'::pg_catalog.regtype, "
658+
" 'pg_catalog.regoperator'::pg_catalog.regtype, "
659+
/* regclass.oid is preserved, so 'regclass' is OK */
660660
/* regtype.oid is preserved, so 'regtype' is OK */
661-
" 'pg_catalog.regconfig'::pg_catalog.regtype, "
662-
" 'pg_catalog.regdictionary'::pg_catalog.regtype) AND "
663-
" c.relnamespace = n.oid AND "
664-
" n.nspname != 'pg_catalog' AND "
665-
" n.nspname != 'information_schema'");
661+
" 'pg_catalog.regconfig'::pg_catalog.regtype, "
662+
" 'pg_catalog.regdictionary'::pg_catalog.regtype) AND "
663+
" c.relnamespace = n.oid AND "
664+
" n.nspname != 'pg_catalog' AND "
665+
" n.nspname != 'information_schema'");
666666

667667
ntups = PQntuples(res);
668668
i_nspname = PQfnumber(res, "nspname");

doc/src/sgml/pgupgrade.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ psql --username postgres --file script.sql postgres
557557
<application>pg_upgrade</> does not support upgrading of databases
558558
containing these <type>reg*</> OID-referencing system data types:
559559
<type>regproc</>, <type>regprocedure</>, <type>regoper</>,
560-
<type>regoperator</>, <type>regclass</>, <type>regconfig</>, and
560+
<type>regoperator</>, <type>regconfig</>, and
561561
<type>regdictionary</>. (<type>regtype</> can be upgraded.)
562562
</para>
563563

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