Re: [HACKERS] "ExecInitIndexScan: both left and right..." meaning? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] "ExecInitIndexScan: both left and right..." meaning?
Date
Msg-id 23308.945316988@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] "ExecInitIndexScan: both left and right..." meaning?  (Ed Loehr <ELOEHR@austin.rr.com>)
List pgsql-hackers
Ed Loehr <ELOEHR@austin.rr.com> writes:
>> Sounds like you've found a bug.  How about a specific example of
>> a query that causes this?

> Unfortunately, this is the simplest example I have to offer.  The
> following query succeeds numerous times before going into a continuous
> failure mode due to the error above.  Vacuuming the DB fixes the
> problem temporarily "for a while".

Oh my, *that's* interesting.  I have no idea what could be causing that.
The error message you're getting suggests that the planner is generating
an incorrect plan tree for the query, which I'd believe soon enough,
but I don't understand why the behavior would change over time.
A VACUUM could change the planner's results by altering the stored
statistics for the tables --- but if you're not vacuuming, the plan
should be the same every time.

Does the EXPLAIN output showing the query plan change from when it's
working to when it's not?  What would really be helpful is to see the
EXPLAIN VERBOSE output in both states (preferably, the pretty-printed
version that gets put in the postmaster log file, not the compressed
version that gets sent to the client).

Also, what indexes do you have on these tables?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] NOTICE: LockRelease: locktable lookup failed, no lock
Next
From: Ed Loehr
Date:
Subject: Re: [HACKERS] "ExecInitIndexScan: both left and right..." meaning?