mirror of
https://github.com/postgres/postgres.git
synced 2026-03-03 05:40:43 -05:00
Currently, database OIDs, relfilenodes, and tablespace OIDs can all change when a cluster is upgraded using pg_upgrade. It seems better to preserve them, because (1) it makes troubleshooting pg_upgrade easier, since you don't have to do a lot of work to match up files in the old and new clusters, (2) it allows 'rsync' to save bandwidth when used to re-sync a cluster after an upgrade, and (3) if we ever encrypt or sign blocks, we would likely want to use a nonce that depends on these values. This patch only arranges to preserve relfilenodes and tablespace OIDs. The task of preserving database OIDs is left for another patch, since it involves some complexities that don't exist in these cases. Database OIDs have a similar issue, but there are some tricky points in that case that do not apply to these cases, so that problem is left for another patch. Shruthi KC, based on an earlier patch from Antonin Houska, reviewed and with some adjustments by me. Discussion: http://postgr.es/m/CA+TgmoYgTwYcUmB=e8+hRHOFA0kkS6Kde85+UNdon6q7bt1niQ@mail.gmail.com
36 lines
1.4 KiB
C
36 lines
1.4 KiB
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* binary_upgrade.h
|
|
* variables used for binary upgrades
|
|
*
|
|
*
|
|
* Portions Copyright (c) 1996-2022, 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_tablespace_oid;
|
|
|
|
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_mrng_pg_type_oid;
|
|
extern PGDLLIMPORT Oid binary_upgrade_next_mrng_array_pg_type_oid;
|
|
|
|
extern PGDLLIMPORT Oid binary_upgrade_next_heap_pg_class_oid;
|
|
extern PGDLLIMPORT Oid binary_upgrade_next_heap_pg_class_relfilenode;
|
|
extern PGDLLIMPORT Oid binary_upgrade_next_index_pg_class_oid;
|
|
extern PGDLLIMPORT Oid binary_upgrade_next_index_pg_class_relfilenode;
|
|
extern PGDLLIMPORT Oid binary_upgrade_next_toast_pg_class_oid;
|
|
extern PGDLLIMPORT Oid binary_upgrade_next_toast_pg_class_relfilenode;
|
|
|
|
extern PGDLLIMPORT Oid binary_upgrade_next_pg_enum_oid;
|
|
extern PGDLLIMPORT Oid binary_upgrade_next_pg_authid_oid;
|
|
|
|
extern PGDLLIMPORT bool binary_upgrade_record_init_privs;
|
|
|
|
#endif /* BINARY_UPGRADE_H */
|