Raise error on concurrent drop of partitioned index
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 1 Sep 2020 17:40:43 +0000 (13:40 -0400)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 1 Sep 2020 17:40:43 +0000 (13:40 -0400)
commit7067ba1b4b905046819368e787809c5df0ebef04
tree436ace3f25f525433190d6e861d605e8666faea0
parent55aea0c706caa1d69dd550303ebefc310be4672c
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.mussler@zalando.de>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/16594-d2956ca909585067@postgresql.org
doc/src/sgml/ref/drop_index.sgml
src/backend/commands/tablecmds.c
src/test/regress/expected/indexing.out
src/test/regress/sql/indexing.sql