diff --strip-trailing-cr -U3 C:/cirrus/contrib/pg_stat_statements/expected/parallel.out C:/cirrus/build/testrun/pg_stat_statements/regress/results/parallel.out --- C:/cirrus/contrib/pg_stat_statements/expected/parallel.out 2025-03-20 18:04:19.888273900 +0000 +++ C:/cirrus/build/testrun/pg_stat_statements/regress/results/parallel.out 2025-03-20 18:10:14.359413700 +0000 @@ -15,20 +15,10 @@ (1 row) SELECT count(*) FROM pgss_parallel_tab; - count -------- - 0 -(1 row) - -SELECT query, - parallel_workers_to_launch > 0 AS has_workers_to_launch, - parallel_workers_launched > 0 AS has_workers_launched - FROM pg_stat_statements - WHERE query ~ 'SELECT count' - ORDER BY query COLLATE "C"; - query | has_workers_to_launch | has_workers_launched -----------------------------------------+-----------------------+---------------------- - SELECT count(*) FROM pgss_parallel_tab | t | t -(1 row) - -DROP TABLE pgss_parallel_tab; +WARNING: terminating connection because of crash of another server process +DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. +HINT: In a moment you should be able to reconnect to the database and repeat your command. +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost diff --strip-trailing-cr -U3 C:/cirrus/contrib/pg_stat_statements/expected/squashing.out C:/cirrus/build/testrun/pg_stat_statements/regress/results/squashing.out --- C:/cirrus/contrib/pg_stat_statements/expected/squashing.out 2025-03-20 18:04:19.892715500 +0000 +++ C:/cirrus/build/testrun/pg_stat_statements/regress/results/squashing.out 2025-03-20 18:10:17.074662500 +0000 @@ -182,283 +182,7 @@ -- FuncExpr -- Verify multiple type representation end up with the same query_id CREATE TABLE test_float (data float); -SELECT pg_stat_statements_reset() IS NOT NULL AS t; - t ---- - t -(1 row) - -SELECT data FROM test_float WHERE data IN (1, 2); - data ------- -(0 rows) - -SELECT data FROM test_float WHERE data IN (1, '2'); - data ------- -(0 rows) - -SELECT data FROM test_float WHERE data IN ('1', 2); - data ------- -(0 rows) - -SELECT data FROM test_float WHERE data IN ('1', '2'); - data ------- -(0 rows) - -SELECT data FROM test_float WHERE data IN (1.0, 1.0); - data ------- -(0 rows) - -SELECT query, calls FROM pg_stat_statements ORDER BY query COLLATE "C"; - query | calls ------------------------------------------------------------+------- - SELECT data FROM test_float WHERE data IN ($1 /*, ... */) | 5 - SELECT pg_stat_statements_reset() IS NOT NULL AS t | 1 -(2 rows) - --- Numeric type, implicit cast is squashed -CREATE TABLE test_squash_numeric (id int, data numeric(5, 2)); -SELECT pg_stat_statements_reset() IS NOT NULL AS t; - t ---- - t -(1 row) - -SELECT * FROM test_squash_numeric WHERE data IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); - id | data -----+------ -(0 rows) - -SELECT query, calls FROM pg_stat_statements ORDER BY query COLLATE "C"; - query | calls ------------------------------------------------------------------+------- - SELECT * FROM test_squash_numeric WHERE data IN ($1 /*, ... */) | 1 - SELECT pg_stat_statements_reset() IS NOT NULL AS t | 1 -(2 rows) - --- Bigint, implicit cast is squashed -CREATE TABLE test_squash_bigint (id int, data bigint); -SELECT pg_stat_statements_reset() IS NOT NULL AS t; - t ---- - t -(1 row) - -SELECT * FROM test_squash_bigint WHERE data IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); - id | data -----+------ -(0 rows) - -SELECT query, calls FROM pg_stat_statements ORDER BY query COLLATE "C"; - query | calls -----------------------------------------------------------------+------- - SELECT * FROM test_squash_bigint WHERE data IN ($1 /*, ... */) | 1 - SELECT pg_stat_statements_reset() IS NOT NULL AS t | 1 -(2 rows) - --- Bigint, explicit cast is not squashed -SELECT pg_stat_statements_reset() IS NOT NULL AS t; - t ---- - t -(1 row) - -SELECT * FROM test_squash_bigint WHERE data IN - (1::bigint, 2::bigint, 3::bigint, 4::bigint, 5::bigint, 6::bigint, - 7::bigint, 8::bigint, 9::bigint, 10::bigint, 11::bigint); - id | data -----+------ -(0 rows) - -SELECT query, calls FROM pg_stat_statements ORDER BY query COLLATE "C"; - query | calls -----------------------------------------------------+------- - SELECT * FROM test_squash_bigint WHERE data IN +| 1 - ($1 /*, ... */::bigint) | - SELECT pg_stat_statements_reset() IS NOT NULL AS t | 1 -(2 rows) - --- Bigint, long tokens with parenthesis -SELECT pg_stat_statements_reset() IS NOT NULL AS t; - t ---- - t -(1 row) - -SELECT * FROM test_squash_bigint WHERE id IN - (abs(100), abs(200), abs(300), abs(400), abs(500), abs(600), abs(700), - abs(800), abs(900), abs(1000), ((abs(1100)))); - id | data -----+------ -(0 rows) - -SELECT query, calls FROM pg_stat_statements ORDER BY query COLLATE "C"; - query | calls --------------------------------------------------------------------------+------- - SELECT * FROM test_squash_bigint WHERE id IN +| 1 - (abs($1), abs($2), abs($3), abs($4), abs($5), abs($6), abs($7),+| - abs($8), abs($9), abs($10), ((abs($11)))) | - SELECT pg_stat_statements_reset() IS NOT NULL AS t | 1 -(2 rows) - --- CoerceViaIO, SubLink instead of a Const -CREATE TABLE test_squash_jsonb (id int, data jsonb); -SELECT pg_stat_statements_reset() IS NOT NULL AS t; - t ---- - t -(1 row) - -SELECT * FROM test_squash_jsonb WHERE data IN - ((SELECT '"1"')::jsonb, (SELECT '"2"')::jsonb, (SELECT '"3"')::jsonb, - (SELECT '"4"')::jsonb, (SELECT '"5"')::jsonb, (SELECT '"6"')::jsonb, - (SELECT '"7"')::jsonb, (SELECT '"8"')::jsonb, (SELECT '"9"')::jsonb, - (SELECT '"10"')::jsonb); - id | data -----+------ -(0 rows) - -SELECT query, calls FROM pg_stat_statements ORDER BY query COLLATE "C"; - query | calls -----------------------------------------------------------------------+------- - SELECT * FROM test_squash_jsonb WHERE data IN +| 1 - ((SELECT $1)::jsonb, (SELECT $2)::jsonb, (SELECT $3)::jsonb,+| - (SELECT $4)::jsonb, (SELECT $5)::jsonb, (SELECT $6)::jsonb,+| - (SELECT $7)::jsonb, (SELECT $8)::jsonb, (SELECT $9)::jsonb,+| - (SELECT $10)::jsonb) | - SELECT pg_stat_statements_reset() IS NOT NULL AS t | 1 -(2 rows) - --- CoerceViaIO --- Create some dummy type to force CoerceViaIO -CREATE TYPE casttesttype; -CREATE FUNCTION casttesttype_in(cstring) - RETURNS casttesttype - AS 'textin' - LANGUAGE internal STRICT IMMUTABLE; -NOTICE: return type casttesttype is only a shell -CREATE FUNCTION casttesttype_out(casttesttype) - RETURNS cstring - AS 'textout' - LANGUAGE internal STRICT IMMUTABLE; -NOTICE: argument type casttesttype is only a shell -LINE 1: CREATE FUNCTION casttesttype_out(casttesttype) - ^ -CREATE TYPE casttesttype ( - internallength = variable, - input = casttesttype_in, - output = casttesttype_out, - alignment = int4 -); -CREATE CAST (int4 AS casttesttype) WITH INOUT; -CREATE FUNCTION casttesttype_eq(casttesttype, casttesttype) -returns boolean language sql immutable as $$ - SELECT true -$$; -CREATE OPERATOR = ( - leftarg = casttesttype, - rightarg = casttesttype, - procedure = casttesttype_eq, - commutator = =); -CREATE TABLE test_squash_cast (id int, data casttesttype); --- Use the introduced type to construct a list of CoerceViaIO around Const -SELECT pg_stat_statements_reset() IS NOT NULL AS t; - t ---- - t -(1 row) - -SELECT * FROM test_squash_cast WHERE data IN - (1::int4::casttesttype, 2::int4::casttesttype, 3::int4::casttesttype, - 4::int4::casttesttype, 5::int4::casttesttype, 6::int4::casttesttype, - 7::int4::casttesttype, 8::int4::casttesttype, 9::int4::casttesttype, - 10::int4::casttesttype, 11::int4::casttesttype); - id | data -----+------ -(0 rows) - -SELECT query, calls FROM pg_stat_statements ORDER BY query COLLATE "C"; - query | calls -----------------------------------------------------+------- - SELECT * FROM test_squash_cast WHERE data IN +| 1 - ($1 /*, ... */::int4::casttesttype) | - SELECT pg_stat_statements_reset() IS NOT NULL AS t | 1 -(2 rows) - --- Some casting expression are simplified to Const -SELECT pg_stat_statements_reset() IS NOT NULL AS t; - t ---- - t -(1 row) - -SELECT * FROM test_squash_jsonb WHERE data IN - (('"1"')::jsonb, ('"2"')::jsonb, ('"3"')::jsonb, ('"4"')::jsonb, - ( '"5"')::jsonb, ( '"6"')::jsonb, ( '"7"')::jsonb, ( '"8"')::jsonb, - ( '"9"')::jsonb, ( '"10"')::jsonb); - id | data -----+------ -(0 rows) - -SELECT query, calls FROM pg_stat_statements ORDER BY query COLLATE "C"; - query | calls -----------------------------------------------------+------- - SELECT * FROM test_squash_jsonb WHERE data IN +| 1 - (($1 /*, ... */)::jsonb) | - SELECT pg_stat_statements_reset() IS NOT NULL AS t | 1 -(2 rows) - --- RelabelType -SELECT pg_stat_statements_reset() IS NOT NULL AS t; - t ---- - t -(1 row) - -SELECT * FROM test_squash WHERE id IN (1::oid, 2::oid, 3::oid, 4::oid, 5::oid, 6::oid, 7::oid, 8::oid, 9::oid); - id | data -----+------ -(0 rows) - -SELECT query, calls FROM pg_stat_statements ORDER BY query COLLATE "C"; - query | calls -------------------------------------------------------------+------- - SELECT * FROM test_squash WHERE id IN ($1 /*, ... */::oid) | 1 - SELECT pg_stat_statements_reset() IS NOT NULL AS t | 1 -(2 rows) - --- Test constants evaluation in a CTE, which was causing issues in the past -WITH cte AS ( - SELECT 'const' as const FROM test_squash -) -SELECT ARRAY['a', 'b', 'c', const::varchar] AS result -FROM cte; - result --------- -(0 rows) - --- Simple array would be squashed as well -SELECT pg_stat_statements_reset() IS NOT NULL AS t; - t ---- - t -(1 row) - -SELECT ARRAY[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; - array ------------------------- - {1,2,3,4,5,6,7,8,9,10} -(1 row) - -SELECT query, calls FROM pg_stat_statements ORDER BY query COLLATE "C"; - query | calls -----------------------------------------------------+------- - SELECT ARRAY[$1 /*, ... */] | 1 - SELECT pg_stat_statements_reset() IS NOT NULL AS t | 1 -(2 rows) - -RESET query_id_squash_values; +server closed the connection unexpectedly + This probably means the server terminated abnormally + before or while processing the request. +connection to server was lost