From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: pgsql@tomd.cc
Subject: BUG #15871: Regression in 11.4 altering type on column with an index
Date: Tue, 25 Jun 2019 04:49:24 +0000
Message-ID: <15871-d05340216f10eee4@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 15871
Logged by: Tom Dunstan
Email address: pgsql@tomd.cc
PostgreSQL version: 11.4
Operating system: Linux x86_64 (Alpine 3.9)
Description:
This worked up to 11.3:
test=# CREATE TABLE foo (ts1 TIMESTAMP NOT NULL, ts2 TIMESTAMP NOT NULL);
CREATE TABLE
test=# CREATE INDEX foo_ts1_idx ON foo (ts1);
CREATE INDEX
test=# CREATE INDEX foo_ts2_idx ON foo (ts2);
CREATE INDEX
test=# ALTER TABLE FOO ALTER ts1 TYPE TIMESTAMP WITH TIME ZONE, ALTER ts2
TYPE TIMESTAMP WITH TIME ZONE;
ERROR: 42P07: relation "foo_ts1_idx" already exists
LOCATION: index_create, index.c:877
Necessary condition seems to be:
- Multiple columns altered in the same statement
- Both altered columns have an index
Altering in separate statements, or not having one of the indexes doesn't
trigger it.
May be related to this item mentioned in the 11.4 release notes: "Fix
failure of ALTER TABLE ... ALTER COLUMN TYPE when the table has a partial
exclusion constraint (Tom Lane)"
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-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql@tomd.cc
Subject: Re: BUG #15871: Regression in 11.4 altering type on column with an index
In-Reply-To: <15871-d05340216f10eee4@postgresql.org>
References: <15871-d05340216f10eee4@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