mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
Revert 56-bit relfilenode change and follow-up commits.
There are still some alignment-related failures in the buildfarm, which might or might not be able to be fixed quickly, but I've also just realized that it increased the size of many WAL records by 4 bytes because a block reference contains a RelFileLocator. The effect of that hasn't been studied or discussed, so revert for now.
This commit is contained in:
@ -14375,14 +14375,10 @@ ATExecSetTableSpace(Oid tableOid, Oid newTableSpace, LOCKMODE lockmode)
|
||||
}
|
||||
|
||||
/*
|
||||
* Generate a new relfilenumber. We cannot reuse the old relfilenumber
|
||||
* because of the possibility that that relation will be moved back to the
|
||||
* original tablespace before the next checkpoint. At that point, the
|
||||
* first segment of the main fork won't have been unlinked yet, and an
|
||||
* attempt to create new relation storage with that same relfilenumber
|
||||
* will fail.
|
||||
* Relfilenumbers are not unique in databases across tablespaces, so we
|
||||
* need to allocate a new one in the new tablespace.
|
||||
*/
|
||||
newrelfilenumber = GetNewRelFileNumber(newTableSpace,
|
||||
newrelfilenumber = GetNewRelFileNumber(newTableSpace, NULL,
|
||||
rel->rd_rel->relpersistence);
|
||||
|
||||
/* Open old and new relation */
|
||||
|
Reference in New Issue
Block a user