From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix possible future cache reference leak in ALTER EXTENSION ADD/
Date: Fri, 17 Apr 2020 17:42:10 +0000
Message-ID: <E1jPV0E-0001Cj-G6@gemulon.postgresql.org> (raw)
Fix possible future cache reference leak in ALTER EXTENSION ADD/DROP.
recordExtObjInitPriv and removeExtObjInitPriv were sloppy about
calling ReleaseSysCache. The cases cannot occur given current usage
in ALTER EXTENSION ADD/DROP, since we wouldn't get here for these
relkinds; but it seems wise to clean up better.
In passing, extend test logic in test_pg_dump to exercise the
dropped-column code paths here.
Since the case is unreachable at present, there seems no great
need to back-patch; hence fix HEAD only.
Kyotaro Horiguchi, with test case and comment adjustments by me
Discussion: https://postgr.es/m/20200417.151831.1153577605111650154.horikyota.ntt@gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/3125a5baec1cf6d3aaeb8964bc3b3c49835e0452
Modified Files
--------------
src/backend/catalog/aclchk.c | 47 +++++++++++++---------
src/test/modules/test_pg_dump/README | 2 +
.../modules/test_pg_dump/expected/test_pg_dump.out | 3 +-
src/test/modules/test_pg_dump/sql/test_pg_dump.sql | 3 +-
4 files changed, 35 insertions(+), 20 deletions(-)
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: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Fix possible future cache reference leak in ALTER EXTENSION ADD/
In-Reply-To: <E1jPV0E-0001Cj-G6@gemulon.postgresql.org>
References: <E1jPV0E-0001Cj-G6@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