pgsql: Raise error on concurrent drop of partitioned index

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Raise error on concurrent drop of partitioned index
Date: 2020-09-01 17:42:01
Message-ID: E1kDAID-0000IM-Qk@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Raise error on concurrent drop of partitioned index

We were already raising an error for DROP INDEX CONCURRENTLY on a
partitioned table, albeit a different and confusing one:
ERROR: DROP INDEX CONCURRENTLY must be first action in transaction

Change that to throw a more comprehensible error:
ERROR: cannot drop partitioned index \"%s\" concurrently

Michael Paquier authored the test case for indexes on temporary
partitioned tables.

Backpatch to 11, where indexes on partitioned tables were added.

Reported-by: Jan Mussler <jan(dot)mussler(at)zalando(dot)de>
Reviewed-by: Michael Paquier <michael(at)paquier(dot)xyz>
Discussion: https://postgr.es/m/16594-d2956ca909585067@postgresql.org

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7067ba1b4b905046819368e787809c5df0ebef04

Modified Files
--------------
doc/src/sgml/ref/drop_index.sgml | 2 ++
src/backend/commands/tablecmds.c | 11 +++++++++++
src/test/regress/expected/indexing.out | 20 ++++++++++++++++++++
src/test/regress/sql/indexing.sql | 13 +++++++++++++
4 files changed, 46 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2020-09-01 21:00:27 pgsql: doc: clarify that max_wal_size is "during" checkpoints
Previous Message Tom Lane 2020-09-01 17:15:22 pgsql: Teach libpq to handle arbitrary-length lines in .pgpass files.