1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-25 21:42:33 +03:00

Fix InitializeRelfilenumberMap for 05d4cbf9b6ba708858984b01ca0fc56d59d4ec7c

Since relfilenodes are now 56-bits, we use bigint as the SQL type
to represent them, which means F_INT8EQ must be used here rather
than F_OIDEQ. On 64-bit machines this doesn't matter, but 32-bit
machines are unhappy.

Dilip Kumar

Discussion: http://postgr.es/m/CAFiTN-t71ciSckMzixAhrF9py7oRO6xszKi4mTRwjuucXr5tpw@mail.gmail.com
This commit is contained in:
Robert Haas 2022-09-28 08:02:30 -04:00
parent 0222be1371
commit 6af0827232

View File

@ -88,7 +88,6 @@ static void
InitializeRelfilenumberMap(void)
{
HASHCTL ctl;
int i;
/* Make sure we've initialized CacheMemoryContext. */
if (CacheMemoryContext == NULL)
@ -97,17 +96,20 @@ InitializeRelfilenumberMap(void)
/* build skey */
MemSet(&relfilenumber_skey, 0, sizeof(relfilenumber_skey));
for (i = 0; i < 2; i++)
{
fmgr_info_cxt(F_OIDEQ,
&relfilenumber_skey[i].sk_func,
CacheMemoryContext);
relfilenumber_skey[i].sk_strategy = BTEqualStrategyNumber;
relfilenumber_skey[i].sk_subtype = InvalidOid;
relfilenumber_skey[i].sk_collation = InvalidOid;
}
fmgr_info_cxt(F_OIDEQ,
&relfilenumber_skey[0].sk_func,
CacheMemoryContext);
relfilenumber_skey[0].sk_strategy = BTEqualStrategyNumber;
relfilenumber_skey[0].sk_subtype = InvalidOid;
relfilenumber_skey[0].sk_collation = InvalidOid;
relfilenumber_skey[0].sk_attno = Anum_pg_class_reltablespace;
fmgr_info_cxt(F_INT8EQ,
&relfilenumber_skey[1].sk_func,
CacheMemoryContext);
relfilenumber_skey[1].sk_strategy = BTEqualStrategyNumber;
relfilenumber_skey[1].sk_subtype = InvalidOid;
relfilenumber_skey[1].sk_collation = InvalidOid;
relfilenumber_skey[1].sk_attno = Anum_pg_class_relfilenode;
/*