regression tests fails

Started by Pavel Stehuleover 9 years ago6 messageshackers
Jump to latest
#1Pavel Stehule
pavel.stehule@gmail.com

Hi

I have a repeated problem with regress tests

master, Fedora 25,

running on port 50848 with PID 5548
============== creating database "regression" ==============
CREATE DATABASE
ALTER DATABASE
============== running regression test queries ==============
test ddl ... ok
test xact ... ok
test rewrite ... ok
test toast ... ok
test permissions ... ok
test decoding_in_xact ... ok
test decoding_into_rel ... ok
test binary ... ok
test prepared ... ok
test replorigin ... ok
test time ... ok
test messages ... ok
test spill ... FAILED
============== shutting down postmaster ==============

The result is in unstable order.

Regards

Pavel

Attachments:

regression.diffsapplication/octet-stream; name=regression.diffsDownload+8-8
#2Pavel Stehule
pavel.stehule@gmail.com
In reply to: Pavel Stehule (#1)
Re: regression tests fails

2016-11-16 5:54 GMT+01:00 Pavel Stehule <pavel.stehule@gmail.com>:

Hi

I have a repeated problem with regress tests

master, Fedora 25,

running on port 50848 with PID 5548
============== creating database "regression" ==============
CREATE DATABASE
ALTER DATABASE
============== running regression test queries ==============
test ddl ... ok
test xact ... ok
test rewrite ... ok
test toast ... ok
test permissions ... ok
test decoding_in_xact ... ok
test decoding_into_rel ... ok
test binary ... ok
test prepared ... ok
test replorigin ... ok
test time ... ok
test messages ... ok
test spill ... FAILED
============== shutting down postmaster ==============

The result is in unstable order.

I was wrong - there is ORDER BY clause

SELECT (regexp_split_to_array(data, ':'))[4], COUNT(*),
(array_agg(data))[1], (array_agg(data))[count(*)]
FROM pg_logical_slot_get_changes('regression_slot', NULL,NULL) WHERE data
~ 'INSERT'
GROUP BY 1 ORDER BY 1;

but result is sensitive on locales setting - doesn't work well with czech
locales.

Regards

Pavel

Show quoted text

Regards

Pavel

#3Craig Ringer
craig@2ndquadrant.com
In reply to: Pavel Stehule (#2)
Re: regression tests fails

On 21 November 2016 at 14:45, Pavel Stehule <pavel.stehule@gmail.com> wrote:

SELECT (regexp_split_to_array(data, ':'))[4], COUNT(*),
(array_agg(data))[1], (array_agg(data))[count(*)]
FROM pg_logical_slot_get_changes('regression_slot', NULL,NULL) WHERE data
~ 'INSERT'
GROUP BY 1 ORDER BY 1;

but result is sensitive on locales setting - doesn't work well with czech
locales.

Simple fix here is to append COLLATE "C" after the ORDER BY.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#4Pavel Stehule
pavel.stehule@gmail.com
In reply to: Craig Ringer (#3)
Re: regression tests fails

2016-11-21 8:09 GMT+01:00 Craig Ringer <craig@2ndquadrant.com>:

On 21 November 2016 at 14:45, Pavel Stehule <pavel.stehule@gmail.com>
wrote:

SELECT (regexp_split_to_array(data, ':'))[4], COUNT(*),
(array_agg(data))[1], (array_agg(data))[count(*)]
FROM pg_logical_slot_get_changes('regression_slot', NULL,NULL) WHERE

data

~ 'INSERT'
GROUP BY 1 ORDER BY 1;

but result is sensitive on locales setting - doesn't work well with czech
locales.

Simple fix here is to append COLLATE "C" after the ORDER BY.

it needs little bit bigger change - COLLATE cannot be used with positional
ORDER BY

Regards

Pavel

Show quoted text

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

#5Pavel Stehule
pavel.stehule@gmail.com
In reply to: Pavel Stehule (#4)
Re: regression tests fails

2016-11-21 8:13 GMT+01:00 Pavel Stehule <pavel.stehule@gmail.com>:

2016-11-21 8:09 GMT+01:00 Craig Ringer <craig@2ndquadrant.com>:

On 21 November 2016 at 14:45, Pavel Stehule <pavel.stehule@gmail.com>
wrote:

SELECT (regexp_split_to_array(data, ':'))[4], COUNT(*),
(array_agg(data))[1], (array_agg(data))[count(*)]
FROM pg_logical_slot_get_changes('regression_slot', NULL,NULL) WHERE

data

~ 'INSERT'
GROUP BY 1 ORDER BY 1;

but result is sensitive on locales setting - doesn't work well with

czech

locales.

Simple fix here is to append COLLATE "C" after the ORDER BY.

it needs little bit bigger change - COLLATE cannot be used with positional
ORDER BY

here is a patch

Regards

Pavel

Show quoted text

Regards

Pavel

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachments:

fix-regression-test-spill.patchtext/x-patch; charset=US-ASCII; name=fix-regression-test-spill.patchDownload+10-10
#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Pavel Stehule (#5)
Re: regression tests fails

Pavel Stehule <pavel.stehule@gmail.com> writes:

2016-11-21 8:09 GMT+01:00 Craig Ringer <craig@2ndquadrant.com>:

Simple fix here is to append COLLATE "C" after the ORDER BY.

here is a patch

Pushed, thanks.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers