Commit 527fdd9d authored by Bruce Momjian's avatar Bruce Momjian

Move pg_upgrade_support global variables to their own include file

Previously their declarations were spread around to avoid accidental
access.
parent 73bcb76b
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "postgres.h" #include "postgres.h"
#include "catalog/binary_upgrade.h"
#include "catalog/namespace.h" #include "catalog/namespace.h"
#include "catalog/pg_type.h" #include "catalog/pg_type.h"
#include "commands/extension.h" #include "commands/extension.h"
...@@ -24,17 +25,6 @@ ...@@ -24,17 +25,6 @@
PG_MODULE_MAGIC; PG_MODULE_MAGIC;
#endif #endif
extern PGDLLIMPORT Oid binary_upgrade_next_pg_type_oid;
extern PGDLLIMPORT Oid binary_upgrade_next_array_pg_type_oid;
extern PGDLLIMPORT Oid binary_upgrade_next_toast_pg_type_oid;
extern PGDLLIMPORT Oid binary_upgrade_next_heap_pg_class_oid;
extern PGDLLIMPORT Oid binary_upgrade_next_index_pg_class_oid;
extern PGDLLIMPORT Oid binary_upgrade_next_toast_pg_class_oid;
extern PGDLLIMPORT Oid binary_upgrade_next_pg_enum_oid;
extern PGDLLIMPORT Oid binary_upgrade_next_pg_authid_oid;
Datum set_next_pg_type_oid(PG_FUNCTION_ARGS); Datum set_next_pg_type_oid(PG_FUNCTION_ARGS);
Datum set_next_array_pg_type_oid(PG_FUNCTION_ARGS); Datum set_next_array_pg_type_oid(PG_FUNCTION_ARGS);
Datum set_next_toast_pg_type_oid(PG_FUNCTION_ARGS); Datum set_next_toast_pg_type_oid(PG_FUNCTION_ARGS);
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "access/sysattr.h" #include "access/sysattr.h"
#include "access/transam.h" #include "access/transam.h"
#include "access/xact.h" #include "access/xact.h"
#include "catalog/binary_upgrade.h"
#include "catalog/catalog.h" #include "catalog/catalog.h"
#include "catalog/dependency.h" #include "catalog/dependency.h"
#include "catalog/heap.h" #include "catalog/heap.h"
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "access/visibilitymap.h" #include "access/visibilitymap.h"
#include "access/xact.h" #include "access/xact.h"
#include "bootstrap/bootstrap.h" #include "bootstrap/bootstrap.h"
#include "catalog/binary_upgrade.h"
#include "catalog/catalog.h" #include "catalog/catalog.h"
#include "catalog/dependency.h" #include "catalog/dependency.h"
#include "catalog/heap.h" #include "catalog/heap.h"
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "access/heapam.h" #include "access/heapam.h"
#include "access/htup_details.h" #include "access/htup_details.h"
#include "access/xact.h" #include "access/xact.h"
#include "catalog/binary_upgrade.h"
#include "catalog/catalog.h" #include "catalog/catalog.h"
#include "catalog/indexing.h" #include "catalog/indexing.h"
#include "catalog/pg_enum.h" #include "catalog/pg_enum.h"
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "access/heapam.h" #include "access/heapam.h"
#include "access/htup_details.h" #include "access/htup_details.h"
#include "access/xact.h" #include "access/xact.h"
#include "catalog/binary_upgrade.h"
#include "catalog/dependency.h" #include "catalog/dependency.h"
#include "catalog/indexing.h" #include "catalog/indexing.h"
#include "catalog/objectaccess.h" #include "catalog/objectaccess.h"
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "access/tuptoaster.h" #include "access/tuptoaster.h"
#include "access/xact.h" #include "access/xact.h"
#include "catalog/binary_upgrade.h"
#include "catalog/dependency.h" #include "catalog/dependency.h"
#include "catalog/heap.h" #include "catalog/heap.h"
#include "catalog/index.h" #include "catalog/index.h"
...@@ -31,8 +32,6 @@ ...@@ -31,8 +32,6 @@
#include "utils/syscache.h" #include "utils/syscache.h"
/* Potentially set by contrib/pg_upgrade_support functions */ /* Potentially set by contrib/pg_upgrade_support functions */
extern Oid binary_upgrade_next_toast_pg_class_oid;
Oid binary_upgrade_next_toast_pg_type_oid = InvalidOid; Oid binary_upgrade_next_toast_pg_type_oid = InvalidOid;
static bool create_toast_table(Relation rel, Oid toastOid, Oid toastIndexOid, static bool create_toast_table(Relation rel, Oid toastOid, Oid toastIndexOid,
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "access/heapam.h" #include "access/heapam.h"
#include "access/htup_details.h" #include "access/htup_details.h"
#include "access/xact.h" #include "access/xact.h"
#include "catalog/binary_upgrade.h"
#include "catalog/catalog.h" #include "catalog/catalog.h"
#include "catalog/dependency.h" #include "catalog/dependency.h"
#include "catalog/heap.h" #include "catalog/heap.h"
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "access/heapam.h" #include "access/heapam.h"
#include "access/htup_details.h" #include "access/htup_details.h"
#include "access/xact.h" #include "access/xact.h"
#include "catalog/binary_upgrade.h"
#include "catalog/dependency.h" #include "catalog/dependency.h"
#include "catalog/indexing.h" #include "catalog/indexing.h"
#include "catalog/objectaccess.h" #include "catalog/objectaccess.h"
......
/*-------------------------------------------------------------------------
*
* binary_upgrade.h
* variables used for binary upgrades
*
*
* Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* src/include/catalog/binary_upgrade.h
*
*-------------------------------------------------------------------------
*/
#ifndef BINARY_UPGRADE_H
#define BINARY_UPGRADE_H
extern PGDLLIMPORT Oid binary_upgrade_next_pg_type_oid;
extern PGDLLIMPORT Oid binary_upgrade_next_array_pg_type_oid;
extern PGDLLIMPORT Oid binary_upgrade_next_toast_pg_type_oid;
extern PGDLLIMPORT Oid binary_upgrade_next_heap_pg_class_oid;
extern PGDLLIMPORT Oid binary_upgrade_next_index_pg_class_oid;
extern PGDLLIMPORT Oid binary_upgrade_next_toast_pg_class_oid;
extern PGDLLIMPORT Oid binary_upgrade_next_pg_enum_oid;
extern PGDLLIMPORT Oid binary_upgrade_next_pg_authid_oid;
#endif /* BINARY_UPGRADE_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment