pgsql: Use a more portable way to get the version string in PostgresNod

2021-05-20 Thread Andrew Dunstan
Use a more portable way to get the version string in PostgresNode Older versions of perl on Windows don't like the list form of pipe open, and perlcritic doesn't like the string form of open, so we avoid both with a simpler formulation using qx{}. Per complaint from Amit Kapila. Branch -- ma

pgsql: Clean up cpluspluscheck violation.

2021-05-20 Thread Tom Lane
Clean up cpluspluscheck violation. "typename" is a C++ keyword, so pg_upgrade.h fails to compile in C++. Fortunately, there seems no likely reason for somebody to need to do that. Nonetheless, it's project policy that all .h files should pass cpluspluscheck, so rename the argument to fix that. O

pgsql: Clean up cpluspluscheck violation.

2021-05-20 Thread Tom Lane
Clean up cpluspluscheck violation. "typename" is a C++ keyword, so pg_upgrade.h fails to compile in C++. Fortunately, there seems no likely reason for somebody to need to do that. Nonetheless, it's project policy that all .h files should pass cpluspluscheck, so rename the argument to fix that. O

pgsql: Clean up cpluspluscheck violation.

2021-05-20 Thread Tom Lane
Clean up cpluspluscheck violation. "typename" is a C++ keyword, so pg_upgrade.h fails to compile in C++. Fortunately, there seems no likely reason for somebody to need to do that. Nonetheless, it's project policy that all .h files should pass cpluspluscheck, so rename the argument to fix that. O

pgsql: Clean up cpluspluscheck violation.

2021-05-20 Thread Tom Lane
Clean up cpluspluscheck violation. "typename" is a C++ keyword, so pg_upgrade.h fails to compile in C++. Fortunately, there seems no likely reason for somebody to need to do that. Nonetheless, it's project policy that all .h files should pass cpluspluscheck, so rename the argument to fix that. O

pgsql: Clean up cpluspluscheck violation.

2021-05-20 Thread Tom Lane
Clean up cpluspluscheck violation. "typename" is a C++ keyword, so pg_upgrade.h fails to compile in C++. Fortunately, there seems no likely reason for somebody to need to do that. Nonetheless, it's project policy that all .h files should pass cpluspluscheck, so rename the argument to fix that. O

pgsql: Clean up cpluspluscheck violation.

2021-05-20 Thread Tom Lane
Clean up cpluspluscheck violation. "typename" is a C++ keyword, so pg_upgrade.h fails to compile in C++. Fortunately, there seems no likely reason for somebody to need to do that. Nonetheless, it's project policy that all .h files should pass cpluspluscheck, so rename the argument to fix that. O

pgsql: Install PostgresVersion.pm

2021-05-20 Thread Andrew Dunstan
Install PostgresVersion.pm A lamentable oversight on my part meant that when PostgresVersion.pm was added in commit 4c4eaf3d19 provision to install it was not added to the Makefile, so it was not installed along with the other perl modules. Branch -- master Details --- https://git.postgr

pgsql: doc: change PG 14 relnotes as suggested by Justin Pryzby

2021-05-20 Thread Bruce Momjian
doc: change PG 14 relnotes as suggested by Justin Pryzby Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/4f586fe244a296d7c781de3f06c54755f2ae222b Modified Files -- doc/src/sgml/release-14.sgml | 12 ++-- 1 file changed, 6 insertions(+), 6 deletio

pgsql: Avoid detoasting failure after COMMIT inside a plpgsql FOR loop.

2021-05-20 Thread Tom Lane
Avoid detoasting failure after COMMIT inside a plpgsql FOR loop. exec_for_query() normally tries to prefetch a few rows at a time from the query being iterated over, so as to reduce executor entry/exit overhead. Unfortunately this is unsafe if we have COMMIT or ROLLBACK within the loop, because t

pgsql: Avoid detoasting failure after COMMIT inside a plpgsql FOR loop.

2021-05-20 Thread Tom Lane
Avoid detoasting failure after COMMIT inside a plpgsql FOR loop. exec_for_query() normally tries to prefetch a few rows at a time from the query being iterated over, so as to reduce executor entry/exit overhead. Unfortunately this is unsafe if we have COMMIT or ROLLBACK within the loop, because t

pgsql: Avoid detoasting failure after COMMIT inside a plpgsql FOR loop.

2021-05-20 Thread Tom Lane
Avoid detoasting failure after COMMIT inside a plpgsql FOR loop. exec_for_query() normally tries to prefetch a few rows at a time from the query being iterated over, so as to reduce executor entry/exit overhead. Unfortunately this is unsafe if we have COMMIT or ROLLBACK within the loop, because t

pgsql: Avoid detoasting failure after COMMIT inside a plpgsql FOR loop.

2021-05-20 Thread Tom Lane
Avoid detoasting failure after COMMIT inside a plpgsql FOR loop. exec_for_query() normally tries to prefetch a few rows at a time from the query being iterated over, so as to reduce executor entry/exit overhead. Unfortunately this is unsafe if we have COMMIT or ROLLBACK within the loop, because t

pgsql: Fix deadlock for multiple replicating truncates of the same tabl

2021-05-20 Thread Amit Kapila
Fix deadlock for multiple replicating truncates of the same table. While applying the truncate change, the logical apply worker acquires RowExclusiveLock on the relation being truncated. This allowed truncate on the relation at a time by two apply workers which lead to a deadlock. The reason was t

pgsql: Fix deadlock for multiple replicating truncates of the same tabl

2021-05-20 Thread Amit Kapila
Fix deadlock for multiple replicating truncates of the same table. While applying the truncate change, the logical apply worker acquires RowExclusiveLock on the relation being truncated. This allowed truncate on the relation at a time by two apply workers which lead to a deadlock. The reason was t

pgsql: Fix deadlock for multiple replicating truncates of the same tabl

2021-05-20 Thread Amit Kapila
Fix deadlock for multiple replicating truncates of the same table. While applying the truncate change, the logical apply worker acquires RowExclusiveLock on the relation being truncated. This allowed truncate on the relation at a time by two apply workers which lead to a deadlock. The reason was t

pgsql: Fix deadlock for multiple replicating truncates of the same tabl

2021-05-20 Thread Amit Kapila
Fix deadlock for multiple replicating truncates of the same table. While applying the truncate change, the logical apply worker acquires RowExclusiveLock on the relation being truncated. This allowed truncate on the relation at a time by two apply workers which lead to a deadlock. The reason was t