ERROR: cache lookup failed for collation 0 on DELETE query after upgrading from 9.X to 12.3 - Mailing list pgsql-bugs

From cen
Subject ERROR: cache lookup failed for collation 0 on DELETE query after upgrading from 9.X to 12.3
Date
Msg-id 32493fc9-cb34-08cd-6a22-8b414e7f395f@gmail.com
Whole thread Raw
Responses Re: ERROR: cache lookup failed for collation 0 on DELETE query after upgrading from 9.X to 12.3
Re: ERROR: cache lookup failed for collation 0 on DELETE query after upgrading from 9.X to 12.3
List pgsql-bugs

Hi

we are upgrading to 12.3 from 9.X and encountered an error with delete statements.


2020-07-14 15:26:20.728 CEST [67736] ERROR:  cache lookup failed for collation 0
2020-07-14 15:26:20.728 CEST [67736] STATEMENT:  delete from my-table where id='004b8d45-d205-4036-9e70-c8340a015674'

ID column is of type UUID. Additionally, we have an implicit cast function from varchar to UUID due to a JPA implementation which is having problems handling of UUID types.


CREATE FUNCTION varchar_to_uuid(VARCHAR) RETURNS uuid AS $$
SELECT uuid_in($1::cstring);
$$ LANGUAGE sql immutable;
CREATE CAST (VARCHAR AS UUID) WITH FUNCTION varchar_to_uuid(VARCHAR) AS IMPLICIT;

I suspected the problem would be connected to this cast but even after dropping the cast and the function I get the same error so it probably has nothing to do with it.
Other than that there is nothing particularly interesting with this table or the setup.
We encountered the same problem on 12.3 debian docker aswell as MacOS brew package which I use locally for development.


Best regards, cen


pgsql-bugs by date:

Previous
From: David Rowley
Date:
Subject: Re: Small query using LATERAL that segfaults Postgres
Next
From: cen
Date:
Subject: Re: ERROR: cache lookup failed for collation 0 on DELETE query after upgrading from 9.X to 12.3