pgsql: Fixes in ALTER SUBSCRIPTION DROP PUBLICATION code

2021-06-25 Thread Peter Eisentraut
Fixes in ALTER SUBSCRIPTION DROP PUBLICATION code ALTER SUBSCRIPTION DROP PUBLICATION does not actually support copy_data option, so remove it from tab completion. Also, reword the error message that is thrown when all the publications from a subscription are specified to be dropped. Also, made

pgsql: Put option listing back into alphabetical order

2021-06-25 Thread Peter Eisentraut
Put option listing back into alphabetical order Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/3af10943ce21450e299b3915b9cad47cd90369e9 Modified Files -- doc/src/sgml/ref/vacuumdb.sgml | 30 +++--- src/bin/scripts/vacuumdb.c |

Re: pgsql: Fix pattern matching logic for logs in TAP tests of pgbench

2021-06-25 Thread Andrew Dunstan
On 6/24/21 11:08 PM, Michael Paquier wrote: > On Thu, Jun 24, 2021 at 10:26:18PM -0400, Andrew Dunstan wrote: >> Since the file isn't read in using slurp_file, that $ won't match >> because the lines will end \r\n instead of \n. > I did not remember this one with Msys, thanks. I am not sure that

pgsql: Cleanup some code related to pgbench log checks in TAP tests

2021-06-25 Thread Michael Paquier
Cleanup some code related to pgbench log checks in TAP tests This fixes a couple of problems within the so-said code of this commit subject: - Replace the use of open() with slurp_file(), fixing an issue reported by buildfarm member fairywren whose perl installation keep around CRLF characters, ca

pgsql: Cleanup some code related to pgbench log checks in TAP tests

2021-06-25 Thread Michael Paquier
Cleanup some code related to pgbench log checks in TAP tests This fixes a couple of problems within the so-said code of this commit subject: - Replace the use of open() with slurp_file(), fixing an issue reported by buildfarm member fairywren whose perl installation keep around CRLF characters, ca

pgsql: Cleanup some code related to pgbench log checks in TAP tests

2021-06-25 Thread Michael Paquier
Cleanup some code related to pgbench log checks in TAP tests This fixes a couple of problems within the so-said code of this commit subject: - Replace the use of open() with slurp_file(), fixing an issue reported by buildfarm member fairywren whose perl installation keep around CRLF characters, ca

pgsql: Cleanup some code related to pgbench log checks in TAP tests

2021-06-25 Thread Michael Paquier
Cleanup some code related to pgbench log checks in TAP tests This fixes a couple of problems within the so-said code of this commit subject: - Replace the use of open() with slurp_file(), fixing an issue reported by buildfarm member fairywren whose perl installation keep around CRLF characters, ca

Re: pgsql: Fix pattern matching logic for logs in TAP tests of pgbench

2021-06-25 Thread Michael Paquier
On Fri, Jun 25, 2021 at 06:12:09AM -0400, Andrew Dunstan wrote: > +        # On Msys, filter out any CRLF. > +        $contents_raw =~ s/\r\n/\n/g if $Config{osname} eq 'msys'; > > This is completely redundant. The whole point is that slurp_file does > exactly this for you. Thanks. I have manage

pgsql: Make walsenders show their replication commands in pg_stat_activ

2021-06-25 Thread Tom Lane
Make walsenders show their replication commands in pg_stat_activity. A walsender process that has executed a SQL command left the text of that command in pg_stat_activity.query indefinitely, which is quite confusing if it's in RUNNING state but not doing that query. An easy and useful fix is to t

pgsql: Make walsenders show their replication commands in pg_stat_activ

2021-06-25 Thread Tom Lane
Make walsenders show their replication commands in pg_stat_activity. A walsender process that has executed a SQL command left the text of that command in pg_stat_activity.query indefinitely, which is quite confusing if it's in RUNNING state but not doing that query. An easy and useful fix is to t

pgsql: Make walsenders show their replication commands in pg_stat_activ

2021-06-25 Thread Tom Lane
Make walsenders show their replication commands in pg_stat_activity. A walsender process that has executed a SQL command left the text of that command in pg_stat_activity.query indefinitely, which is quite confusing if it's in RUNNING state but not doing that query. An easy and useful fix is to t

pgsql: Make walsenders show their replication commands in pg_stat_activ

2021-06-25 Thread Tom Lane
Make walsenders show their replication commands in pg_stat_activity. A walsender process that has executed a SQL command left the text of that command in pg_stat_activity.query indefinitely, which is quite confusing if it's in RUNNING state but not doing that query. An easy and useful fix is to t

pgsql: Doc: remove commit f560209c6 from v14 release notes.

2021-06-25 Thread Tom Lane
Doc: remove commit f560209c6 from v14 release notes. Now that this has been back-patched, it's no longer a new feature for v14. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/8a80562d732c0da1ddcc9fb88dfb976f4b846577 Modified Files -- doc/src/sgml/relea

Re: pgsql: Doc: remove commit f560209c6 from v14 release notes.

2021-06-25 Thread Bruce Momjian
On Fri, Jun 25, 2021 at 03:18:21PM +, Tom Lane wrote: > Doc: remove commit f560209c6 from v14 release notes. > > Now that this has been back-patched, it's no longer a new feature > for v14. Thanks. Not sure how I can better catch these kind of cases in the future. -- Bruce Momjian

Re: pgsql: Doc: remove commit f560209c6 from v14 release notes.

2021-06-25 Thread Tom Lane
Bruce Momjian writes: > On Fri, Jun 25, 2021 at 03:18:21PM +, Tom Lane wrote: >> Doc: remove commit f560209c6 from v14 release notes. >> >> Now that this has been back-patched, it's no longer a new feature >> for v14. > Thanks. Not sure how I can better catch these kind of cases in the > fu

pgsql: Remove unnecessary failure cases in RemoveRoleFromObjectPolicy()

2021-06-25 Thread Tom Lane
Remove unnecessary failure cases in RemoveRoleFromObjectPolicy(). It's not really necessary for this function to open or lock the relation associated with the pg_policy entry it's modifying. The error checks it's making on the rel are if anything counterproductive (e.g., if we don't want to allow

pgsql: Remove unnecessary failure cases in RemoveRoleFromObjectPolicy()

2021-06-25 Thread Tom Lane
Remove unnecessary failure cases in RemoveRoleFromObjectPolicy(). It's not really necessary for this function to open or lock the relation associated with the pg_policy entry it's modifying. The error checks it's making on the rel are if anything counterproductive (e.g., if we don't want to allow

pgsql: Remove unnecessary failure cases in RemoveRoleFromObjectPolicy()

2021-06-25 Thread Tom Lane
Remove unnecessary failure cases in RemoveRoleFromObjectPolicy(). It's not really necessary for this function to open or lock the relation associated with the pg_policy entry it's modifying. The error checks it's making on the rel are if anything counterproductive (e.g., if we don't want to allow

pgsql: Remove unnecessary failure cases in RemoveRoleFromObjectPolicy()

2021-06-25 Thread Tom Lane
Remove unnecessary failure cases in RemoveRoleFromObjectPolicy(). It's not really necessary for this function to open or lock the relation associated with the pg_policy entry it's modifying. The error checks it's making on the rel are if anything counterproductive (e.g., if we don't want to allow

pgsql: Remove unnecessary failure cases in RemoveRoleFromObjectPolicy()

2021-06-25 Thread Tom Lane
Remove unnecessary failure cases in RemoveRoleFromObjectPolicy(). It's not really necessary for this function to open or lock the relation associated with the pg_policy entry it's modifying. The error checks it's making on the rel are if anything counterproductive (e.g., if we don't want to allow

pgsql: Remove unnecessary failure cases in RemoveRoleFromObjectPolicy()

2021-06-25 Thread Tom Lane
Remove unnecessary failure cases in RemoveRoleFromObjectPolicy(). It's not really necessary for this function to open or lock the relation associated with the pg_policy entry it's modifying. The error checks it's making on the rel are if anything counterproductive (e.g., if we don't want to allow

pgsql: Remove some useless logs from the TAP tests of pgbench

2021-06-25 Thread Michael Paquier
Remove some useless logs from the TAP tests of pgbench 002_pgbench_no_server was printing some array pointers instead of the actual contents of those arrays for the expected outputs of stdout and stderr for a tested command. This does not add any new information that can help with debugging as th

pgsql: Remove some useless logs from the TAP tests of pgbench

2021-06-25 Thread Michael Paquier
Remove some useless logs from the TAP tests of pgbench 002_pgbench_no_server was printing some array pointers instead of the actual contents of those arrays for the expected outputs of stdout and stderr for a tested command. This does not add any new information that can help with debugging as th

pgsql: Remove some useless logs from the TAP tests of pgbench

2021-06-25 Thread Michael Paquier
Remove some useless logs from the TAP tests of pgbench 002_pgbench_no_server was printing some array pointers instead of the actual contents of those arrays for the expected outputs of stdout and stderr for a tested command. This does not add any new information that can help with debugging as th

pgsql: Remove some useless logs from the TAP tests of pgbench

2021-06-25 Thread Michael Paquier
Remove some useless logs from the TAP tests of pgbench 002_pgbench_no_server was printing some array pointers instead of the actual contents of those arrays for the expected outputs of stdout and stderr for a tested command. This does not add any new information that can help with debugging as th

pgsql: Remove non-existing variable reference in MSVC's Solution.pm

2021-06-25 Thread Michael Paquier
Remove non-existing variable reference in MSVC's Solution.pm The version string is grabbed from PACKAGE_VERSION in pg_config.h in the MSVC build since 8f4fb4c6, but an error message referenced a variable that existed before that. This had no consequences except if one messes up enough with the ve

pgsql: Remove non-existing variable reference in MSVC's Solution.pm

2021-06-25 Thread Michael Paquier
Remove non-existing variable reference in MSVC's Solution.pm The version string is grabbed from PACKAGE_VERSION in pg_config.h in the MSVC build since 8f4fb4c6, but an error message referenced a variable that existed before that. This had no consequences except if one messes up enough with the ve