From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Forbid DROP SCHEMA on temporary namespaces
Date: Fri, 27 Dec 2019 09:03:30 +0000
Message-ID: <E1iklWs-0002ak-Iq@gemulon.postgresql.org> (raw)
Forbid DROP SCHEMA on temporary namespaces
This operation was possible for the owner of the schema or a superuser.
Down to 9.4, doing this operation would cause inconsistencies in a
session whose temporary schema was dropped, particularly if trying to
create new temporary objects after the drop. A more annoying
consequence is a crash of autovacuum on an assertion failure when
logging information about an orphaned temp table dropped. Note that
because of 246a6c8 (present in v11~), which has made the removal of
orphaned temporary tables more aggressive, the failure could be
triggered more easily, but it is possible to reproduce down to 9.4.
Reported-by: Mahendra Singh, Prabhat Sahu
Author: Michael Paquier
Reviewed-by: Kyotaro Horiguchi, Mahendra Singh
Discussion: https://postgr.es/m/CAKYtNAr9Zq=1-ww4etHo-VCC-k120YxZy5OS01VkaLPaDbv2tg@mail.gmail.com
Backpatch-through: 9.4
Branch
------
REL9_5_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/12cb5478a2a451fd291a535b8b1b387b3a81914a
Modified Files
--------------
src/backend/commands/dropcmds.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
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: michael@paquier.xyz
Subject: Re: pgsql: Forbid DROP SCHEMA on temporary namespaces
In-Reply-To: <E1iklWs-0002ak-Iq@gemulon.postgresql.org>
References: <E1iklWs-0002ak-Iq@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