From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: jan.mussler@zalando.de
Subject: BUG #16594: DROP INDEX CONCURRENTLY fails on partitioned table with a non helpful error message.
Date: Wed, 26 Aug 2020 20:11:16 +0000
Message-ID: <16594-d2956ca909585067@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 16594
Logged by: Jan Mussler
Email address: jan.mussler@zalando.de
PostgreSQL version: 12.3
Operating system: Ubuntu
Description:
Hello everyone,
earlier today we observed a user trying to drop an index concurrently
yielding the following error message:
DROP INDEX CONCURRENTLY IF EXISTS some_idx;
ERROR: DROP INDEX CONCURRENTLY must be first action in transaction
Continuing down this road the user was asked double check what was going on
and try with a rollback first, yielding the following example output:
=> rollback;
WARNING: there is no transaction in progress
ROLLBACK
=> DROP INDEX CONCURRENTLY IF EXISTS some_idx;
ERROR: DROP INDEX CONCURRENTLY must be first action in transaction
=>
After more digging the user elaborated that this is in fact a partitioned
table.
While a person with deeper knowledge may understand that there is more going
on when dropping an index on a partitioned table from a normal user
perspective this error message is confusing.
We have some internal discussion if this is a bug or lack of documentation.
I am siding though with bug believing the otherwise excellent Postgres error
messages can be more helpful here.
Open for feedback and we can also see to contribute to the docs if needed.
-- Jan
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, jan.mussler@zalando.de
Subject: Re: BUG #16594: DROP INDEX CONCURRENTLY fails on partitioned table with a non helpful error message.
In-Reply-To: <16594-d2956ca909585067@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