pgsql: Forbid DROP SCHEMA on temporary namespaces

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Forbid DROP SCHEMA on temporary namespaces
Date: 2019-12-27 09:03:30
Message-ID: E1iklWs-0002am-Jj@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/898e0c650097a724177ade1af552901385eaf6c1

Modified Files
--------------
src/backend/commands/dropcmds.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2019-12-27 19:33:39 pgsql: docs: clarify infinite range values from data-type infinities
Previous Message Andrew Dunstan 2019-12-27 03:47:53 Re: pgsql: Fix compiler warning for ppoll() on Cygwin