Re: Sudden database error with COUNT(*) making Query Planner crashes: variable not found in subplan target list - Mailing list pgsql-hackers

From David Rowley
Subject Re: Sudden database error with COUNT(*) making Query Planner crashes: variable not found in subplan target list
Date
Msg-id CAApHDvr-uuK1mTp2fWLq1V=GL5BvhJ09xuszoCso7VWhVF-yEA@mail.gmail.com
Whole thread Raw
In response to RE: Sudden database error with COUNT(*) making Query Planner crashes: variable not found in subplan target list  (Jean Landercy - BEEODIVERSITY <jean.landercy@beeodiversity.com>)
Responses Re: Sudden database error with COUNT(*) making Query Planner crashes: variable not found in subplan target list
List pgsql-hackers
On Tue, 7 Jun 2022 at 19:58, Jean Landercy - BEEODIVERSITY
<jean.landercy@beeodiversity.com> wrote:
> Here is the detail of the table (I have anonymized it on SO, this is its real name):

>     "logistic_site_location_54ae0166_id" gist (location)

I imagine this is due to the planner choosing an index-only scan on
the above index. A similar problem was reported in [1].

A fix was committed in [2], which appears in 13.7.

You could turn off enable_indexonlyscan until 13.7 is available to you.

David

[1] https://www.postgresql.org/message-id/CAHUie24ddN+pDNw7fkhNrjrwAX=fXXfGZZEHhRuofV_N_ftaSg@mail.gmail.com
[2] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=0778b24ced8a873b432641001d046d1dde602466



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Collation version tracking for macOS
Next
From: Tom Lane
Date:
Subject: Re: Collation version tracking for macOS