pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Manuel Rigger <rigger.manuel@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Subject: Re: Unexpected "cache lookup failed for collation 0" failure
Date: Wed, 13 Nov 2019 23:09:12 -0500
Message-ID: <21560.1573704552@sss.pgh.pa.us> (raw)
In-Reply-To: <20191114040342.GC1910@paquier.xyz>
References: <CA+u7OA4HOjtymxAbuGNh4-X_2R0Lw5n01tzvP8E5-i-2gQXYWA@mail.gmail.com>
	<19497.1573663852@sss.pgh.pa.us>
	<2906.1573678571@sss.pgh.pa.us>
	<20191114040342.GC1910@paquier.xyz>

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





view thread (5+ messages)

Message-ID: <21560.1573704552@sss.pgh.pa.us>
Permalink:  ../21560.1573704552@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21560.1573704552@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz, rigger.manuel@gmail.com, peter.eisentraut@2ndquadrant.com
  Subject: Re: Unexpected "cache lookup failed for collation 0" failure
  In-Reply-To: <21560.1573704552@sss.pgh.pa.us>
  References: <CA+u7OA4HOjtymxAbuGNh4-X_2R0Lw5n01tzvP8E5-i-2gQXYWA@mail.gmail.com> <19497.1573663852@sss.pgh.pa.us> <2906.1573678571@sss.pgh.pa.us> <20191114040342.GC1910@paquier.xyz> <21560.1573704552@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox