pgsql: Fix the bugs in selecting the transaction for streaming.

2021-04-29 Thread Amit Kapila
Fix the bugs in selecting the transaction for streaming. There were two problems: a. We were always selecting the next available txn instead of selecting it when it is larger than the previous transaction. b. We were selecting the transactions which haven't made any changes to the database (base s

pgsql: Adjust EXPLAIN output for parallel Result Cache plans

2021-04-29 Thread David Rowley
Adjust EXPLAIN output for parallel Result Cache plans Here we adjust the EXPLAIN ANALYZE output for Result Cache so that we don't show any Result Cache stats for parallel workers who don't contribute anything to Result Cache plan nodes. I originally had ideas that workers who don't help could sti

pgsql: Another try to fix the test case added by commit f5fc2f5b23.

2021-04-29 Thread Amit Kapila
Another try to fix the test case added by commit f5fc2f5b23. As per analysis, it appears that the 'drop slot' message from the previous test and 'create slot' message of the new test are either missed or not yet delivered to the stats collector due to which we will still see the stats from the old

pgsql: Improve wording of some pg_upgrade failure reports.

2021-04-29 Thread Tom Lane
Improve wording of some pg_upgrade failure reports. Don't advocate dropping a whole table when dropping a column would serve. While at it, try to make the layout of these messages a bit cleaner and more consistent. Per suggestion from Daniel Gustafsson. No back-patch, as we generally don't like

pgsql: Fix some more omissions in pg_upgrade's tests for non-upgradable

2021-04-29 Thread Tom Lane
Fix some more omissions in pg_upgrade's tests for non-upgradable types. Commits 29aeda6e4 et al closed up some oversights involving not checking for non-upgradable types within container types, such as arrays and ranges. However, I only looked at version.c, failing to notice that there were subst

pgsql: Fix some more omissions in pg_upgrade's tests for non-upgradable

2021-04-29 Thread Tom Lane
Fix some more omissions in pg_upgrade's tests for non-upgradable types. Commits 29aeda6e4 et al closed up some oversights involving not checking for non-upgradable types within container types, such as arrays and ranges. However, I only looked at version.c, failing to notice that there were subst

pgsql: Fix some more omissions in pg_upgrade's tests for non-upgradable

2021-04-29 Thread Tom Lane
Fix some more omissions in pg_upgrade's tests for non-upgradable types. Commits 29aeda6e4 et al closed up some oversights involving not checking for non-upgradable types within container types, such as arrays and ranges. However, I only looked at version.c, failing to notice that there were subst

pgsql: Fix some more omissions in pg_upgrade's tests for non-upgradable

2021-04-29 Thread Tom Lane
Fix some more omissions in pg_upgrade's tests for non-upgradable types. Commits 29aeda6e4 et al closed up some oversights involving not checking for non-upgradable types within container types, such as arrays and ranges. However, I only looked at version.c, failing to notice that there were subst

pgsql: Fix some more omissions in pg_upgrade's tests for non-upgradable

2021-04-29 Thread Tom Lane
Fix some more omissions in pg_upgrade's tests for non-upgradable types. Commits 29aeda6e4 et al closed up some oversights involving not checking for non-upgradable types within container types, such as arrays and ranges. However, I only looked at version.c, failing to notice that there were subst

pgsql: Fix some more omissions in pg_upgrade's tests for non-upgradable

2021-04-29 Thread Tom Lane
Fix some more omissions in pg_upgrade's tests for non-upgradable types. Commits 29aeda6e4 et al closed up some oversights involving not checking for non-upgradable types within container types, such as arrays and ranges. However, I only looked at version.c, failing to notice that there were subst

pgsql: Improve documentation for default_tablespace on partitioned tabl

2021-04-29 Thread Alvaro Herrera
Improve documentation for default_tablespace on partitioned tables Backpatch to 12, where 87259588d0ab introduced the current behavior. Per note from Justin Pryzby. Co-authored-by: Justin Pryzby Discussion: https://postgr.es/m/[email protected] Branch -- REL_13_STABLE De

pgsql: Improve documentation for default_tablespace on partitioned tabl

2021-04-29 Thread Alvaro Herrera
Improve documentation for default_tablespace on partitioned tables Backpatch to 12, where 87259588d0ab introduced the current behavior. Per note from Justin Pryzby. Co-authored-by: Justin Pryzby Discussion: https://postgr.es/m/[email protected] Branch -- REL_12_STABLE De

pgsql: Improve documentation for default_tablespace on partitioned tabl

2021-04-29 Thread Alvaro Herrera
Improve documentation for default_tablespace on partitioned tables Backpatch to 12, where 87259588d0ab introduced the current behavior. Per note from Justin Pryzby. Co-authored-by: Justin Pryzby Discussion: https://postgr.es/m/[email protected] Branch -- master Details -

pgsql: psql: Fix line continuation prompts for unbalanced parentheses

2021-04-29 Thread Peter Eisentraut
psql: Fix line continuation prompts for unbalanced parentheses This was broken by a silly mistake in e717a9a18b2e34c9c40e5259ad4d31cd7e420750. Reported-by: Jeff Janes Author: Justin Pryzby Discussion: https://www.postgresql.org/message-id/CAMkU=1zKGWEJdBbYKw7Tn7cJmYR_UjgdcXTPDqJj=dnwcet...@mai