diff --git a/contrib/pg_tde/src/include/catalog/tde_global_space.h b/contrib/pg_tde/src/include/catalog/tde_global_space.h index a3f91097fa1..a1f297ffcd5 100644 --- a/contrib/pg_tde/src/include/catalog/tde_global_space.h +++ b/contrib/pg_tde/src/include/catalog/tde_global_space.h @@ -15,12 +15,17 @@ #include "catalog/pg_tablespace_d.h" /* - * Needed for global data (WAL etc) keys identification in caches and storage. - * We take Oids of the sql operators, so there is no overlap with the "real" - * catalog objects possible. + * We pick magical database oids from the tablespace oid which avoids + * collissions with any real database oid. */ -#define GLOBAL_DATA_TDE_OID 607 // TODO: why not repeat GLOBALTABLESPACE_OID ? -#define XLOG_TDE_OID 608 +#define GLOBAL_DATA_TDE_OID GLOBALTABLESPACE_OID +#define DEFAULT_DATA_TDE_OID DEFAULTTABLESPACE_OID + +/* + * This oid can be anything since the database oid is gauranteed to not be a + * real database. + */ +#define XLOG_TDE_OID 1 #define GLOBAL_SPACE_RLOCATOR(_obj_oid) (RelFileLocator) { \ GLOBALTABLESPACE_OID, \ @@ -28,9 +33,6 @@ _obj_oid \ } -/* Needed for using the same default key for multiple databases */ -#define DEFAULT_DATA_TDE_OID DEFAULTTABLESPACE_OID - #define TDEisInGlobalSpace(dbOid) (dbOid == GLOBAL_DATA_TDE_OID) #endif /* TDE_GLOBAL_CATALOG_H */