Skip to content

Commit

Permalink
Align global space dbOid with the backend (#275)
Browse files Browse the repository at this point in the history
PG backend uses `InvalidOid` as the database Oid for global space rel
locators (see: https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/utils/cache/relcache.c;h=930cc03ee20b10262815f7c879494e2576593882;hb=b18b3a8150dbb150124bd345e000d6dc92f3d6dd#l1333).
So should we.

Otherwise, it can (and does) cause issues like
https://perconadev.atlassian.net/browse/PG-1000
In that case, the backend creates a temporary relation in the "global space"
leading to a dbOid mismatch.

Fixes PG-1000
  • Loading branch information
dAdAbird authored Sep 3, 2024
1 parent 6970853 commit 37630d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/include/catalog/tde_global_space.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
* We take Oids of the sql operators, so there is no overlap with the "real"
* catalog objects possible.
*/
#define GLOBAL_DATA_TDE_OID 607 /* Global objects fake "db" */
#define XLOG_TDE_OID 608

#define GLOBAL_DATA_TDE_OID InvalidOid

#define GLOBAL_SPACE_RLOCATOR(_obj_oid) (RelFileLocator) { \
GLOBALTABLESPACE_OID, \
GLOBAL_DATA_TDE_OID, \
Expand Down

0 comments on commit 37630d6

Please sign in to comment.