ERROR: cache lookup failed for collation 0 on DELETE query after upgrading from 9.X to 12.3

From: cen <cen(dot)is(dot)imba(at)gmail(dot)com>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: ERROR: cache lookup failed for collation 0 on DELETE query after upgrading from 9.X to 12.3
Date: 2020-07-14 13:41:12
Message-ID: 32493fc9-cb34-08cd-6a22-8b414e7f395f@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message cen 2020-07-14 13:54:21 Re: ERROR: cache lookup failed for collation 0 on DELETE query after upgrading from 9.X to 12.3
Previous Message David Rowley 2020-07-14 09:04:25 Re: Small query using LATERAL that segfaults Postgres