Additional log line with verbose error logging:
2020-07-14 15:52:46.195 CEST [69575] LOCATION: get_collation_isdeterministic, lsyscache.c:950
On 14. 07. 20 15:41, cen wrote:
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