From: Jeff Davis <pgsql@j-davis.com>
To: pgsql-bugs@postgresql.org
Subject: GetSharedSecurityLabel() should be callable before shared relcaches are available
Date: Fri, 08 Oct 2021 13:55:01 -0700
Message-ID: <ecb7af0b26e3be1d96d291c8453a86f1f82d9061.camel@j-davis.com> (raw)
If I understand correctly, it's intended that GetSharedSecurityLabel()
should be callable before the shared relcaches are built. If so, the
systable_beginscan can't pass an unconditional 'true' for indexOK.
Patch attached.
Regards,
Jeff Davis
Attachments:getsharedsecuritylabel.diff (text/x-patch, 663B) downloaddiff --git a/src/backend/commands/seclabel.c b/src/backend/commands/seclabel.cindex ddc019cb39a..308e0adb553 100644--- a/src/backend/commands/seclabel.c+++ b/src/backend/commands/seclabel.c@@ -244,8 +244,8 @@ GetSharedSecurityLabel(const ObjectAddress *object, const char *provider)
pg_shseclabel = table_open(SharedSecLabelRelationId, AccessShareLock);
- scan = systable_beginscan(pg_shseclabel, SharedSecLabelObjectIndexId, true,- NULL, 3, keys);+ scan = systable_beginscan(pg_shseclabel, SharedSecLabelObjectIndexId,+ criticalSharedRelcachesBuilt, NULL, 3, keys);
tuple = systable_getnext(scan);
if (HeapTupleIsValid(tuple))
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: pgsql@j-davis.com
Subject: Re: GetSharedSecurityLabel() should be callable before shared relcaches are available
In-Reply-To: <ecb7af0b26e3be1d96d291c8453a86f1f82d9061.camel@j-davis.com>
References: <ecb7af0b26e3be1d96d291c8453a86f1f82d9061.camel@j-davis.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox