public inbox for [email protected]  
help / color / mirror / Atom feed
From: Michael Paquier <[email protected]>
To: [email protected]
Subject: pgsql: Fix one-off issue with cache ID in objectaddress.c
Date: Tue, 17 Feb 2026 23:48:42 +0000
Message-ID: <[email protected]> (raw)

Fix one-off issue with cache ID in objectaddress.c

get_catalog_object_by_oid_extended() has been doing a syscache lookup
when given a cache ID strictly higher than 0, which is wrong because the
first valid value of SysCacheIdentifier is 0.

This issue had no consequences, as the first value assigned in the
enum SysCacheIdentifier is AGGFNOID, which is not used in the object
type properties listed in objectaddress.c.  Even if an ID of 0 was
hypotherically given, the code would still work with a less efficient
heap-or-index scan.

Discussion: https://postgr.es/m/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f7df12a66cc90ed12d24edba31eeedfb546ef14c

Modified Files
--------------
src/backend/catalog/objectaddress.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgsql: Fix one-off issue with cache ID in objectaddress.c
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox