Re: Unexpected "cache lookup failed for collation 0" failure - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Unexpected "cache lookup failed for collation 0" failure
Date
Msg-id 21560.1573704552@sss.pgh.pa.us
Whole thread Raw
In response to Re: Unexpected "cache lookup failed for collation 0" failure  (Michael Paquier <michael@paquier.xyz>)
List pgsql-bugs
Michael Paquier <michael@paquier.xyz> writes:
> On Wed, Nov 13, 2019 at 03:56:11PM -0500, Tom Lane wrote:
>> Looks like a simple oversight --- when bpcharne() was made
>> collation-sensitive, it should have grown a check_collation_set()
>> call, but somehow that got left out.  Fixed.

> Wouldn't it be better to add a test case for that?

Didn't see the point particularly; we're not any more likely to
break this function than any other collation-dependent function.

The real question IMO is whether Peter missed any *other* places.
I dug through varlena.c and varchar.c and confirmed that every
call of PG_GET_COLLATION leads to a collation-is-not-zero test
(after this fix), but I didn't try to search the whole backend.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Unexpected "cache lookup failed for collation 0" failure
Next
From: Michael Paquier
Date:
Subject: Re: REINDEX CONCURRENTLY unexpectedly fails