Fix InitializeRelfilenumberMap for 05d4cbf9b6

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
pull/104/head
Robert Haas 3 years ago
parent 0222be1371
commit 6af0827232
  1. 24
      src/backend/utils/cache/relfilenumbermap.c

@ -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;
/*

Loading…
Cancel
Save