pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedALTER INDEX not working in 9.5.1?
5+ messages / 4 participants
[nested] [flat]
* ALTER INDEX not working in 9.5.1?
@ 2016-03-05 11:32 Matthew Byrne <mjw.byrne@gmail.com>
2016-03-07 06:09 ` Re: ALTER INDEX not working in 9.5.1? Tom Lane <tgl@sss.pgh.pa.us>
2016-03-07 06:37 ` Re: ALTER INDEX not working in 9.5.1? Venkata Balaji N <nag1010@gmail.com>
0 siblings, 2 replies; 5+ messages in thread
From: Matthew Byrne @ 2016-03-05 11:32 UTC (permalink / raw)
To: pgsql-bugs
The commands "ALTER INDEX ... RENAME TO..." and "ALTER INDEX ... SET
TABLESPACE ..." seem to work as expected in PostgreSQL 9.4.5 but in 9.5.1
they fail with "ERROR: <index_name> is an index".
I can't find anything in the docs which would explain this.
Sample code:
CREATE TABLE test AS SELECT 1 AS x; --Works fine
CREATE INDEX test_idx ON test(x); --Works fine
ALTER INDEX test_idx RENAME TO other_idx; --Works fine in 9.4.5, throws
"is an index" error in 9.5.1
ALTER INDEX test_idx SET TABLESPACE other_tablespace; --Works fine in
9.4.5, throws "is an index" error in 9.5.1
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: ALTER INDEX not working in 9.5.1?
2016-03-05 11:32 ALTER INDEX not working in 9.5.1? Matthew Byrne <mjw.byrne@gmail.com>
@ 2016-03-07 06:09 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-03-07 06:16 ` Re: ALTER INDEX not working in 9.5.1? David G. Johnston <david.g.johnston@gmail.com>
2016-03-07 07:34 ` Re: ALTER INDEX not working in 9.5.1? Matthew Byrne <mjw.byrne@gmail.com>
1 sibling, 2 replies; 5+ messages in thread
From: Tom Lane @ 2016-03-07 06:09 UTC (permalink / raw)
To: Matthew Byrne <mjw.byrne@gmail.com>; +Cc: pgsql-bugs
Matthew Byrne <mjw.byrne@gmail.com> writes:
> The commands "ALTER INDEX ... RENAME TO..." and "ALTER INDEX ... SET
> TABLESPACE ..." seem to work as expected in PostgreSQL 9.4.5 but in 9.5.1
> they fail with "ERROR: <index_name> is an index".
[ scratches head... ] Your test case works OK for me. Admittedly,
I'm checking 9.5-branch-from-a-day-or-two-back rather than exactly
release 9.5.1; but if we'd broken and then fixed something as basic
as that, I expect we'd know about it.
Is this on a clean compile of 9.5.1 community sources? Using what
compiler exactly, on what platform? Maybe you've got something
like a badly-written event trigger installed?
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: ALTER INDEX not working in 9.5.1?
2016-03-05 11:32 ALTER INDEX not working in 9.5.1? Matthew Byrne <mjw.byrne@gmail.com>
2016-03-07 06:09 ` Re: ALTER INDEX not working in 9.5.1? Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-03-07 06:16 ` David G. Johnston <david.g.johnston@gmail.com>
1 sibling, 0 replies; 5+ messages in thread
From: David G. Johnston @ 2016-03-07 06:16 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Matthew Byrne <mjw.byrne@gmail.com>; pgsql-bugs
On Sun, Mar 6, 2016 at 11:09 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Matthew Byrne <mjw.byrne@gmail.com> writes:
> > The commands "ALTER INDEX ... RENAME TO..." and "ALTER INDEX ... SET
> > TABLESPACE ..." seem to work as expected in PostgreSQL 9.4.5 but in 9.5.1
> > they fail with "ERROR: <index_name> is an index".
>
> [ scratches head... ] Your test case works OK for me. Admittedly,
> I'm checking 9.5-branch-from-a-day-or-two-back rather than exactly
> release 9.5.1; but if we'd broken and then fixed something as basic
> as that, I expect we'd know about it.
>
> Is this on a clean compile of 9.5.1 community sources? Using what
> compiler exactly, on what platform? Maybe you've got something
> like a badly-written event trigger installed?
>
version
PostgreSQL 9.5.1 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu
4.8.2-19ubuntu1) 4.8.2, 64-bit
apt.postgresql.org/Ubuntu 14.04
I didn't do the tablespace query but the two setups and the ALTER INDEX
... RENAME worked for me.
David J.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: ALTER INDEX not working in 9.5.1?
2016-03-05 11:32 ALTER INDEX not working in 9.5.1? Matthew Byrne <mjw.byrne@gmail.com>
2016-03-07 06:09 ` Re: ALTER INDEX not working in 9.5.1? Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-03-07 07:34 ` Matthew Byrne <mjw.byrne@gmail.com>
1 sibling, 0 replies; 5+ messages in thread
From: Matthew Byrne @ 2016-03-07 07:34 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs
Apologies all - this is a false alarm. It was a buggy back-end hook
provided by a colleague.
Matt
On Mon, Mar 7, 2016 at 10:09 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Matthew Byrne <mjw.byrne@gmail.com> writes:
> > The commands "ALTER INDEX ... RENAME TO..." and "ALTER INDEX ... SET
> > TABLESPACE ..." seem to work as expected in PostgreSQL 9.4.5 but in 9.5.1
> > they fail with "ERROR: <index_name> is an index".
>
> [ scratches head... ] Your test case works OK for me. Admittedly,
> I'm checking 9.5-branch-from-a-day-or-two-back rather than exactly
> release 9.5.1; but if we'd broken and then fixed something as basic
> as that, I expect we'd know about it.
>
> Is this on a clean compile of 9.5.1 community sources? Using what
> compiler exactly, on what platform? Maybe you've got something
> like a badly-written event trigger installed?
>
> regards, tom lane
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: ALTER INDEX not working in 9.5.1?
2016-03-05 11:32 ALTER INDEX not working in 9.5.1? Matthew Byrne <mjw.byrne@gmail.com>
@ 2016-03-07 06:37 ` Venkata Balaji N <nag1010@gmail.com>
1 sibling, 0 replies; 5+ messages in thread
From: Venkata Balaji N @ 2016-03-07 06:37 UTC (permalink / raw)
To: Matthew Byrne <mjw.byrne@gmail.com>; +Cc: pgsql-bugs
On Sat, Mar 5, 2016 at 10:32 PM, Matthew Byrne <mjw.byrne@gmail.com> wrote:
> The commands "ALTER INDEX ... RENAME TO..." and "ALTER INDEX ... SET
> TABLESPACE ..." seem to work as expected in PostgreSQL 9.4.5 but in 9.5.1
> they fail with "ERROR: <index_name> is an index".
>
> I can't find anything in the docs which would explain this.
>
> Sample code:
>
> CREATE TABLE test AS SELECT 1 AS x; --Works fine
> CREATE INDEX test_idx ON test(x); --Works fine
> ALTER INDEX test_idx RENAME TO other_idx; --Works fine in 9.4.5, throws
> "is an index" error in 9.5.1
> ALTER INDEX test_idx SET TABLESPACE other_tablespace; --Works fine in
> 9.4.5, throws "is an index" error in 9.5.1
>
In PostgreSQL-9.5.1 - it works fine for me -
postgres=# alter index idx rename to test_idx;
ALTER INDEX
postgres=# alter index test_idx set tablespace tbs;
ALTER INDEX
As said upthread, It must be a trigger or some code blocking the ALTER
INDEX command.
Regards,
Venkata B N
Fujitsu Australia
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2016-03-07 07:34 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-03-05 11:32 ALTER INDEX not working in 9.5.1? Matthew Byrne <mjw.byrne@gmail.com>
2016-03-07 06:09 ` Tom Lane <tgl@sss.pgh.pa.us>
2016-03-07 06:16 ` David G. Johnston <david.g.johnston@gmail.com>
2016-03-07 07:34 ` Matthew Byrne <mjw.byrne@gmail.com>
2016-03-07 06:37 ` Venkata Balaji N <nag1010@gmail.com>
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