Re: Querying foreign table with SP-GiST index results in “ERROR: cache lookup failed for type 0” - Mailing list pgsql-bugs

From Jeff Janes
Subject Re: Querying foreign table with SP-GiST index results in “ERROR: cache lookup failed for type 0”
Date
Msg-id CAMkU=1xocCv5rASP6+GAk3KyhQ-CrzoezQ-vb8p6UuHnX6k38Q@mail.gmail.com
Whole thread Raw
In response to Querying foreign table with SP-GiST index results in “ERROR: cache lookup failed for type 0”  (Joao Ferreira <jpgferreira@yahoo.com>)
Responses Re: Querying foreign table with SP-GiST index results in “ERROR: cache lookup failed for type 0”
Re: Querying foreign table with SP-GiST index results in “ERROR: cache lookup failed for type 0”
List pgsql-bugs
On Tue, Jun 18, 2019 at 8:02 AM Joao Ferreira <jpgferreira@yahoo.com> wrote:
Greetings,

I'm using PostgreSQL 11.3 and I want to access a table in another Postgres database using postgres_fdw but since the original table has an SP-GiST index on a geometry column, the query on the foreign table fails with "ERROR: cache lookup failed for type 0", even if the table is empty (Step 7). This doesn't happen if the query is done directly to the remote table (Steps 3 and 6) or if the remote table doesn't have the index (Steps 3 and 4).

I've verified this on ubuntu 18.04 with 11.3 installed from PGDG apt repo, and attached a single-file reproduction.

If I change from sp-gist to just gist, there is no problem.  And if I change to indexing a built-in sp-gist operator class (point rather than geom), there is also no problem.

Getting postgis to compile is a bit hard and slow, so I haven't completed any tests against the unreleased versions yet.
 
Cheers,

Jeff
Attachment

pgsql-bugs by date:

Previous
From: Joao Ferreira
Date:
Subject: Querying foreign table with SP-GiST index results in “ERROR: cache lookup failed for type 0”
Next
From: Jorge Gustavo Rocha
Date:
Subject: Re: BUG #15827: Unable to connect on Windows using pg_services.conf using Python psycopg2