Re: [HACKERS] regression tests fails
Pavel Stehulewrites: >> 2016-11-21 8:09 GMT+01:00 Craig Ringer : >>> 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
Re: [HACKERS] regression tests fails
2016-11-21 8:13 GMT+01:00 Pavel Stehule: > > > 2016-11-21 8:09 GMT+01:00 Craig Ringer : > >> On 21 November 2016 at 14:45, Pavel Stehule >> 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 > > Regards > > Pavel > > >> >> -- >> Craig Ringer http://www.2ndQuadrant.com/ >> PostgreSQL Development, 24x7 Support, Training & Services >> > > diff --git a/contrib/test_decoding/expected/spill.out b/contrib/test_decoding/expected/spill.out index 363e9a3..10734bd 100644 --- a/contrib/test_decoding/expected/spill.out +++ b/contrib/test_decoding/expected/spill.out @@ -164,7 +164,7 @@ SAVEPOINT s2; INSERT INTO spill_test SELECT 'serialize-subsmall-subbig--2:'||g.i FROM generate_series(2, 5001) g(i); RELEASE SAVEPOINT s2; COMMIT; -SELECT (regexp_split_to_array(data, ':'))[4], COUNT(*), (array_agg(data))[1], (array_agg(data))[count(*)] +SELECT (regexp_split_to_array(data, ':'))[4] COLLATE "C", 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; regexp_split_to_array | count | array_agg |array_agg @@ -182,7 +182,7 @@ INSERT INTO spill_test SELECT 'serialize-nested-subbig-subbig--2:'||g.i FROM gen RELEASE SAVEPOINT s2; RELEASE SAVEPOINT s1; COMMIT; -SELECT (regexp_split_to_array(data, ':'))[4], COUNT(*), (array_agg(data))[1], (array_agg(data))[count(*)] +SELECT (regexp_split_to_array(data, ':'))[4] COLLATE "C", 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; regexp_split_to_array| count | array_agg | array_agg @@ -200,7 +200,7 @@ INSERT INTO spill_test SELECT 'serialize-nested-subbig-subsmall--2:'||g.i FROM g RELEASE SAVEPOINT s2; RELEASE SAVEPOINT s1; COMMIT; -SELECT (regexp_split_to_array(data, ':'))[4], COUNT(*), (array_agg(data))[1], (array_agg(data))[count(*)] +SELECT (regexp_split_to_array(data, ':'))[4] COLLATE "C", 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; regexp_split_to_array | count | array_agg| array_agg @@ -218,7 +218,7 @@ INSERT INTO spill_test SELECT 'serialize-nested-subsmall-subbig--2:'||g.i FROM g RELEASE SAVEPOINT s2; RELEASE SAVEPOINT s1; COMMIT; -SELECT (regexp_split_to_array(data, ':'))[4], COUNT(*), (array_agg(data))[1], (array_agg(data))[count(*)] +SELECT (regexp_split_to_array(data, ':'))[4] COLLATE "C", 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; regexp_split_to_array | count | array_agg | array_agg @@ -238,7 +238,7 @@ SAVEPOINT s3; INSERT INTO spill_test SELECT 'serialize-nested-subbig-subbigabort-subbig-3:'||g.i FROM generate_series(5001, 1) g(i); RELEASE SAVEPOINT s1; COMMIT; -SELECT (regexp_split_to_array(data, ':'))[4], COUNT(*), (array_agg(data))[1], (array_agg(data))[count(*)] +SELECT (regexp_split_to_array(data, ':'))[4] COLLATE "C", 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; regexp_split_to_array | count |array_agg|array_agg diff --git a/contrib/test_decoding/sql/spill.sql b/contrib/test_decoding/sql/spill.sql index 358af0b..e638cac 100644 --- a/contrib/test_decoding/sql/spill.sql +++ b/contrib/test_decoding/sql/spill.sql
Re: [HACKERS] regression tests fails
2016-11-21 8:09 GMT+01:00 Craig Ringer: > On 21 November 2016 at 14:45, Pavel Stehule > 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 > > -- > Craig Ringer http://www.2ndQuadrant.com/ > PostgreSQL Development, 24x7 Support, Training & Services >
Re: [HACKERS] regression tests fails
On 21 November 2016 at 14:45, Pavel Stehulewrote: > 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
Re: [HACKERS] regression tests fails
2016-11-16 5:54 GMT+01:00 Pavel Stehule: > 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 > Regards > > Pavel >
Re: [HACKERS] Regression tests fails to start on system without unix
Added to TODO: Allow the regression tests to start postmaster with -i so the tests can be run on systems that don't support unix-domain sockets --- Tom Lane wrote: Kurt Roeckx [EMAIL PROTECTED] writes: The regression tests will fail to start on a system that doesn't have, or wasn't compiled for, unix domain sockets. I see some options to fix this: - Always start with -i - Make the unix_sockets variable depend on HAVE_UNIX_SOCKETS intead of listen the OSs. The second way is the way it should have been done all along. Probably the best fix is to add a command-line switch to pg_regress to instruct it to use -i, and then have the makefile test HAVE_UNIX_SOCKETS to decide whether to pass that switch. This way, hand invocation of the script could easily run the test both ways, on machines where that's possible. regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED] -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [HACKERS] Regression tests fails to start on system without unix sockets.
Kurt Roeckx [EMAIL PROTECTED] writes: The regression tests will fail to start on a system that doesn't have, or wasn't compiled for, unix domain sockets. I see some options to fix this: - Always start with -i - Make the unix_sockets variable depend on HAVE_UNIX_SOCKETS intead of listen the OSs. The second way is the way it should have been done all along. Probably the best fix is to add a command-line switch to pg_regress to instruct it to use -i, and then have the makefile test HAVE_UNIX_SOCKETS to decide whether to pass that switch. This way, hand invocation of the script could easily run the test both ways, on machines where that's possible. regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]