mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
Force pg_upgrade's to preserve pg_class.oid, not pg_class.relfilenode.
Toast tables have identical pg_class.oid and pg_class.relfilenode, but for clarity it is good to preserve the pg_class.oid. Update comments regarding what is preserved, and do some variable/function renaming for clarity.
This commit is contained in:
@@ -69,7 +69,7 @@
|
||||
|
||||
|
||||
/* Potentially set by contrib/pg_upgrade_support functions */
|
||||
Oid binary_upgrade_next_index_relfilenode = InvalidOid;
|
||||
Oid binary_upgrade_next_index_pg_class_oid = InvalidOid;
|
||||
|
||||
/* state info for validate_index bulkdelete callback */
|
||||
typedef struct
|
||||
@@ -641,13 +641,13 @@ index_create(Oid heapRelationId,
|
||||
if (!OidIsValid(indexRelationId))
|
||||
{
|
||||
/*
|
||||
* Use binary-upgrade override for pg_class.relfilenode/oid,
|
||||
* Use binary-upgrade override for pg_class.oid/relfilenode,
|
||||
* if supplied.
|
||||
*/
|
||||
if (OidIsValid(binary_upgrade_next_index_relfilenode))
|
||||
if (OidIsValid(binary_upgrade_next_index_pg_class_oid))
|
||||
{
|
||||
indexRelationId = binary_upgrade_next_index_relfilenode;
|
||||
binary_upgrade_next_index_relfilenode = InvalidOid;
|
||||
indexRelationId = binary_upgrade_next_index_pg_class_oid;
|
||||
binary_upgrade_next_index_pg_class_oid = InvalidOid;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user