Skip site navigation (1) Skip section navigation (2)

Re: BUG #5985: CLUSTER ... USING can fail with ERROR: index xxx does not belong to table yyy

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Daniel Grace" <thisgenericname(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5985: CLUSTER ... USING can fail with ERROR: index xxx does not belong to table yyy
Date: 2011-04-20 21:47:30
Message-ID: 19837.1303336050@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
I wrote:
> "Daniel Grace" <thisgenericname(at)gmail(dot)com> writes:
>> One such file (contents listed below, admittably not 100% useful without a
>> full schema and data) makes a bunch of alterations to a table but fails when
>> it reaches CLUSTER:

>> psql:D:/SVN/wings/wings/branches/devpg/db/lib/course.sql:38: ERROR:  index
>> 178138 does not belong to table 176177

>> However, this failure only occurs if the file is wrapped in a transaction
>> block.  Outside of a transaction block, it works fine.

> I wonder if the issue is that the planner thinks the index isn't usable
> yet because of HOT-chain issues.

On closer inspection this seems to be just insufficient consideration of
corner cases.  We can handle it with a pretty trivial fix in
plan_cluster_use_sort.  Thanks for the bug report!

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2011-04-20 23:13:25
Subject: Re: BUG #5988: CTINE duplicates constraints
Previous:From: Kevin GrittnerDate: 2011-04-20 21:16:18
Subject: Re: BUG #5989: Assertion failure on UPDATE of big value

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group