diff --strip-trailing-cr -U3 C:/cirrus/src/test/regress/expected/create_table_like.out C:/cirrus/build/testrun/pg_upgrade/002_pg_upgrade/data/results/create_table_like.out --- C:/cirrus/src/test/regress/expected/create_table_like.out 2025-10-01 09:12:13.538748700 +0000 +++ C:/cirrus/build/testrun/pg_upgrade/002_pg_upgrade/data/results/create_table_like.out 2025-10-01 09:18:44.184509900 +0000 @@ -709,14 +709,17 @@ toast.vacuum_truncate = false, log_autovacuum_min_duration = 100, toast.log_autovacuum_min_duration = 100); +ERROR: relation "t" already exists create table t1(like t including storage parameter) with (fillfactor = 100); --error -ERROR: parameter "fillfactor" specified more than once create table t1(like t excluding storage parameter) with (fillfactor = 100); --ok +ERROR: relation "t1" already exists \d+ t1 - Table "public.t1" - Column | Type | Collation | Nullable | Default | Storage | Stats target | Description ---------+------+-----------+----------+---------+----------+--------------+------------- - a | text | | | | extended | | + Table "public.t1" + Column | Type | Collation | Nullable | Default | Storage | Stats target | Description +--------+---------+-----------+----------+---------+---------+--------------+------------- + a | integer | | | | plain | | + b | integer | | | | plain | | + c | integer | | | | plain | | Options: fillfactor=100 create table t2(like t including storage parameter) with ( @@ -728,13 +731,13 @@ left join pg_catalog.pg_class tc ON (c.reltoastrelid = tc.oid) where c.relname in ('t', 't2') order by c.relname \gx --[ RECORD 1 ]-+----------------------------------------------------------------------------------------------------------------------------------------------------- +-[ RECORD 1 ]-+--------------------- relname | t -reloptions | {fillfactor=100,toast_tuple_target=128,vacuum_index_cleanup=auto,vacuum_truncate=true,log_autovacuum_min_duration=100} -toast_options | {vacuum_index_cleanup=auto,vacuum_truncate=false,log_autovacuum_min_duration=100} --[ RECORD 2 ]-+----------------------------------------------------------------------------------------------------------------------------------------------------- +reloptions | +toast_options | +-[ RECORD 2 ]-+--------------------- relname | t2 -reloptions | {parallel_workers=3,fillfactor=100,toast_tuple_target=128,vacuum_index_cleanup=auto,vacuum_truncate=true,log_autovacuum_min_duration=100} -toast_options | {autovacuum_vacuum_threshold=101,autovacuum_vacuum_scale_factor=0.3,vacuum_index_cleanup=auto,vacuum_truncate=false,log_autovacuum_min_duration=100} +reloptions | {parallel_workers=3} +toast_options | drop table t, t1, t2; diff --strip-trailing-cr -U3 C:/cirrus/src/test/regress/expected/incremental_sort.out C:/cirrus/build/testrun/pg_upgrade/002_pg_upgrade/data/results/incremental_sort.out --- C:/cirrus/src/test/regress/expected/incremental_sort.out 2025-10-01 09:12:13.574219500 +0000 +++ C:/cirrus/build/testrun/pg_upgrade/002_pg_upgrade/data/results/incremental_sort.out 2025-10-01 09:18:44.237947200 +0000 @@ -1432,78 +1432,31 @@ insert into t select mod(i,10),mod(i,10),i from generate_series(1,10000) s(i); create index on t (a); analyze t; +ERROR: relation "t" does not exist set enable_incremental_sort = off; explain (costs off) select a,b,sum(c) from t group by 1,2 order by 1,2,3 limit 1; - QUERY PLAN ------------------------------------------------------- - Limit - -> Sort - Sort Key: a, b, (sum(c)) - -> Finalize HashAggregate - Group Key: a, b - -> Gather - Workers Planned: 2 - -> Partial HashAggregate - Group Key: a, b - -> Parallel Seq Scan on t -(10 rows) - +ERROR: relation "t" does not exist +LINE 1: explain (costs off) select a,b,sum(c) from t group by 1,2 or... + ^ set enable_incremental_sort = on; explain (costs off) select a,b,sum(c) from t group by 1,2 order by 1,2,3 limit 1; - QUERY PLAN ----------------------------------------------------------------------- - Limit - -> Incremental Sort - Sort Key: a, b, (sum(c)) - Presorted Key: a, b - -> GroupAggregate - Group Key: a, b - -> Gather Merge - Workers Planned: 2 - -> Incremental Sort - Sort Key: a, b - Presorted Key: a - -> Parallel Index Scan using t_a_idx on t -(12 rows) - +ERROR: relation "t" does not exist +LINE 1: explain (costs off) select a,b,sum(c) from t group by 1,2 or... + ^ -- Incremental sort vs. set operations with varno 0 set enable_hashagg to off; explain (costs off) select * from t union select * from t order by 1,3; - QUERY PLAN ----------------------------------------------------------- - Incremental Sort - Sort Key: t.a, t.c - Presorted Key: t.a - -> Unique - -> Merge Append - Sort Key: t.a, t.b, t.c - -> Gather Merge - Workers Planned: 2 - -> Sort - Sort Key: t.a, t.b, t.c - -> Parallel Seq Scan on t - -> Gather Merge - Workers Planned: 2 - -> Sort - Sort Key: t_1.a, t_1.b, t_1.c - -> Parallel Seq Scan on t t_1 -(16 rows) - +ERROR: relation "t" does not exist +LINE 1: explain (costs off) select * from t union select * from t or... + ^ -- Full sort, not just incremental sort can be pushed below a gather merge path -- by generate_useful_gather_paths. explain (costs off) select distinct a,b from t; - QUERY PLAN ------------------------------------------------- - Unique - -> Gather Merge - Workers Planned: 2 - -> Unique - -> Sort - Sort Key: a, b - -> Parallel Seq Scan on t -(7 rows) - +ERROR: relation "t" does not exist +LINE 1: explain (costs off) select distinct a,b from t; + ^ drop table t; +ERROR: table "t" does not exist -- Sort pushdown can't go below where expressions are part of the rel target. -- In particular this is interesting for volatile expressions which have to -- go above joins since otherwise we'll incorrectly use expression evaluations