Re: pika failing since the per-column collation patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rémi Zara <remi_zara(at)mac(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pika failing since the per-column collation patch
Date: 2011-02-18 07:26:25
Message-ID: 12004.1298013985@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

=?iso-8859-1?Q?R=E9mi_Zara?= <remi_zara(at)mac(dot)com> writes:
> Le 12 fvr. 2011 18:51, Peter Eisentraut a crit :
>> It's only failing on this one machine, but there isn't anything
>> platform-specific in this code, so I'd look for memory management faults
>> on the code or a compiler problem. Try with lower optimization for a
>> start.

> Same failure with -O0 (and more shared memory).

Note that the query that is failing is an intentional probe of
robustness:

-- check that we can apply functions taking ANYARRAY to pg_stats ...
-- such functions must protect themselves if varying element type isn't OK
select max(histogram_bounds) from pg_stats;
ERROR: cannot compare arrays of different element types

pika is instead showing

ERROR: locale operation to be invoked, but no collation was derived

which some trawling through the code says is coming from varstr_cmp
when fn_collation didn't get set on the call.

Hypothesis: the platform-dependency here is just one of row ordering,
to wit, on most platforms the scan of pg_statistic fails before it gets
to the case where the collation issue is triggered. I'm suspicious that
if two text arrays get compared via this code path, fn_collation fails
to get set, and it's not a platform-specific omission.

It'd be helpful if you could identify the specific values that are
getting compared at the moment of the failure.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2011-02-18 07:27:54 Re: Fix for Index Advisor related hooks
Previous Message Gan Jiadong 2011-02-18 06:57:02 Re: About the performance of startup after dropping many tables