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

From: Dewin <thisgenericname(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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-19 19:03:15
Message-ID: BANLkTi=RCc1VB1VfbdWyKL0g4rt0T_xbag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

But if that theory is correct, this isn't a new

> problem in 9.1, it goes back to 8.3. Have you been running this script
> successfully on older versions?
>

On 9.0.

Though... now that I think about it, I found a bug with the script itself (I
was braindead when I wrote the commandline parser and -pvx did not mean -p
-v -x) that was causing it to not always wrap files in transaction blocks
when it was told to, so it is *possible* 9.0 would be likewise affected...
since the problem only is visible when the index is touched in the same
transaction. I don't have the means to test against it right now, however.

>
> I'm not sure how much we can do to fix this without abandoning the HOT
> optimization, which seems unlikely to go over well. We can certainly
> get it to produce a more helpful error message, and we could very likely
> avoid the failure in more cases than we do now, but in the end it
> remains the case that a newly-built index isn't necessarily usable right
> away, and CLUSTER requires the index to be usable --- else you might
> lose some rows.
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2011-04-19 19:29:47 Re: BUG #5987: Rows created by WITH (INSERT ... RETURNING) are not visible to the rest of the query
Previous Message Daniel Grace 2011-04-19 18:54:49 BUG #5987: Rows created by WITH (INSERT ... RETURNING) are not visible to the rest of the query