From: Tomas Vondra <tomas.vondra@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix lookup error in extended stats ownership check
Date: Tue, 31 Aug 2021 16:35:49 +0000
Message-ID: <E1mL6jl-0003Pc-JO@gemulon.postgresql.org> (raw)
Fix lookup error in extended stats ownership check
When an ownership check on extended statistics object failed, the code
was calling aclcheck_error_type to report the failure, which is clearly
wrong, resulting in cache lookup errors. Fix by calling aclcheck_error.
This issue exists since the introduction of extended statistics, so
backpatch all the way back to PostgreSQL 10. It went unnoticed because
there were no tests triggering the error, so add one.
Reported-by: Mark Dilger
Backpatch-through: 10, where extended stats were introduced
Discussion: https://postgr.es/m/1F238937-7CC2-4703-A1B1-6DC225B8978A%40enterprisedb.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/5be8ce82e84f8f3604916c06668990c524f3856d
Modified Files
--------------
src/backend/catalog/objectaddress.c | 3 ++-
src/test/regress/expected/stats_ext.out | 11 +++++++++++
src/test/regress/sql/stats_ext.sql | 9 +++++++++
3 files changed, 22 insertions(+), 1 deletion(-)
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-committers@postgresql.org
Cc: tomas.vondra@postgresql.org
Subject: Re: pgsql: Fix lookup error in extended stats ownership check
In-Reply-To: <E1mL6jl-0003Pc-JO@gemulon.postgresql.org>
References: <E1mL6jl-0003Pc-JO@gemulon.postgresql.org>
* 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