Re: Unexpected "cache lookup failed for collation 0" failure

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Manuel Rigger <rigger(dot)manuel(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Subject: Re: Unexpected "cache lookup failed for collation 0" failure
Date: 2019-11-14 04:09:12
Message-ID: 21560.1573704552@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Michael Paquier <michael(at)paquier(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2019-11-14 08:08:55 Re: REINDEX CONCURRENTLY unexpectedly fails
Previous Message Michael Paquier 2019-11-14 04:03:42 Re: Unexpected "cache lookup failed for collation 0" failure