pgsql: Only ever test for non-127.0.0.1 addresses on Windows in Postgre

2021-04-21 Thread Andrew Dunstan
Only ever test for non-127.0.0.1 addresses on Windows in PostgresNode This has been found to cause hangs where tcp usage is forced. Alexey Kodratov Discussion: https://postgr.es/m/82e271a9a11928337fcb5b5e57b42...@postgrespro.ru Backpatch to all live branches Branch -- REL_13_STABLE Detail

pgsql: Only ever test for non-127.0.0.1 addresses on Windows in Postgre

2021-04-21 Thread Andrew Dunstan
Only ever test for non-127.0.0.1 addresses on Windows in PostgresNode This has been found to cause hangs where tcp usage is forced. Alexey Kodratov Discussion: https://postgr.es/m/82e271a9a11928337fcb5b5e57b42...@postgrespro.ru Backpatch to all live branches Branch -- REL_10_STABLE Detail

pgsql: Only ever test for non-127.0.0.1 addresses on Windows in Postgre

2021-04-21 Thread Andrew Dunstan
Only ever test for non-127.0.0.1 addresses on Windows in PostgresNode This has been found to cause hangs where tcp usage is forced. Alexey Kodratov Discussion: https://postgr.es/m/82e271a9a11928337fcb5b5e57b42...@postgrespro.ru Backpatch to all live branches Branch -- REL_11_STABLE Detail

pgsql: Only ever test for non-127.0.0.1 addresses on Windows in Postgre

2021-04-21 Thread Andrew Dunstan
Only ever test for non-127.0.0.1 addresses on Windows in PostgresNode This has been found to cause hangs where tcp usage is forced. Alexey Kodratov Discussion: https://postgr.es/m/82e271a9a11928337fcb5b5e57b42...@postgrespro.ru Backpatch to all live branches Branch -- REL_12_STABLE Detail

pgsql: Only ever test for non-127.0.0.1 addresses on Windows in Postgre

2021-04-21 Thread Andrew Dunstan
Only ever test for non-127.0.0.1 addresses on Windows in PostgresNode This has been found to cause hangs where tcp usage is forced. Alexey Kodratov Discussion: https://postgr.es/m/82e271a9a11928337fcb5b5e57b42...@postgrespro.ru Backpatch to all live branches Branch -- REL9_6_STABLE Detail

pgsql: Avoid unfortunate IPC::Run path caching in PostgresNode

2021-04-20 Thread Andrew Dunstan
Avoid unfortunate IPC::Run path caching in PostgresNode Commit b34ca595ab provided for installation-aware instances of PostgresNode. However, it turns out that IPC::Run works against this by caching the path to a binary and not consulting the path again, even if it has changed. We work around this

pgsql: Allow TestLib::slurp_file to skip contents, and use as needed

2021-04-16 Thread Andrew Dunstan
Allow TestLib::slurp_file to skip contents, and use as needed In order to avoid getting old logfile contents certain functions in PostgresNode were doing one of two things. On Windows it rotated the logfile and restarted the server, while elsewhere it truncated the log file. Both of these are unne

pgsql: Allow TestLib::slurp_file to skip contents, and use as needed

2021-04-16 Thread Andrew Dunstan
Allow TestLib::slurp_file to skip contents, and use as needed In order to avoid getting old logfile contents certain functions in PostgresNode were doing one of two things. On Windows it rotated the logfile and restarted the server, while elsewhere it truncated the log file. Both of these are unne

pgsql: Allow TestLib::slurp_file to skip contents, and use as needed

2021-04-16 Thread Andrew Dunstan
Allow TestLib::slurp_file to skip contents, and use as needed In order to avoid getting old logfile contents certain functions in PostgresNode were doing one of two things. On Windows it rotated the logfile and restarted the server, while elsewhere it truncated the log file. Both of these are unne

pgsql: Allow TestLib::slurp_file to skip contents, and use as needed

2021-04-16 Thread Andrew Dunstan
Allow TestLib::slurp_file to skip contents, and use as needed In order to avoid getting old logfile contents certain functions in PostgresNode were doing one of two things. On Windows it rotated the logfile and restarted the server, while elsewhere it truncated the log file. Both of these are unne

pgsql: Allow TestLib::slurp_file to skip contents, and use as needed

2021-04-16 Thread Andrew Dunstan
Allow TestLib::slurp_file to skip contents, and use as needed In order to avoid getting old logfile contents certain functions in PostgresNode were doing one of two things. On Windows it rotated the logfile and restarted the server, while elsewhere it truncated the log file. Both of these are unne

pgsql: Allow TestLib::slurp_file to skip contents, and use as needed

2021-04-16 Thread Andrew Dunstan
Allow TestLib::slurp_file to skip contents, and use as needed In order to avoid getting old logfile contents certain functions in PostgresNode were doing one of two things. On Windows it rotated the logfile and restarted the server, while elsewhere it truncated the log file. Both of these are unne

Re: pgsql: SQL-standard function body

2021-04-08 Thread Andrew Dunstan
of the rerun of 'make check' by pg_upgrade's test.sh and instead upgrade the data directory made by the earlier 'make check' run if it's still there (which would mean we'd need to stop it being deleted). cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com

Re: pgsql: Add sortsupport for gist_btree opclasses, for faster index build

2021-04-07 Thread Andrew Dunstan
hat feature for btree_gist. > This appears to have made the buildfarm comprehensively unhappy. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com

pgsql: Fix typo in 6d7a6feac4

2021-04-02 Thread Andrew Dunstan
Fix typo in 6d7a6feac4 Per gripe from Daniel Gustafsson Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/1877c9ac3acc05cc787dd6392d073202f8c8ee21 Modified Files -- src/test/ssl/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: pgsql: Allow matching the DN of a client certificate for authentication

2021-04-01 Thread Andrew Dunstan
On 3/29/21 3:50 PM, Andrew Dunstan wrote: > Allow matching the DN of a client certificate for authentication > > Currently we only recognize the Common Name (CN) of a certificate's > subject to be matched against the user name. Thus certificates with > subjects '/OU=en

pgsql: Allow matching the DN of a client certificate for authentication

2021-03-29 Thread Andrew Dunstan
Allow matching the DN of a client certificate for authentication Currently we only recognize the Common Name (CN) of a certificate's subject to be matched against the user name. Thus certificates with subjects '/OU=eng/CN=fred' and '/OU=sales/CN=fred' will have the same connection rights. This pat

pgsql: Allow for installation-aware instances of PostgresNode

2021-03-24 Thread Andrew Dunstan
Allow for installation-aware instances of PostgresNode Currently instances of PostgresNode find their Postgres executables in the PATH of the caller. This modification allows for instances that know the installation path they are supposed to use, and the module adjusts the environment of methods t

pgsql: Don't run recover crash_temp_files test in Windows perl

2021-03-21 Thread Andrew Dunstan
Don't run recover crash_temp_files test in Windows perl This reverts commit 677271a3a125e294b33b891669f594a2c8cb36ce. "Unbreak recovery test on Windows" The test hangs on Windows, and attempts to remedy the problem have proved fragile at best. So we simply disable the test on Windows perl. (Msys

Re: pgsql: Unbreak recovery test on Windows

2021-03-21 Thread Andrew Dunstan
On 3/21/21 2:16 PM, Tom Lane wrote: > Andrew Dunstan writes: >> Ugh.  Is there any reason we need to do those kills before we end the >> psql processes? If not I'm tempted just to move them - after the psql's >> are finished it should be safe. At any rate I'

Re: pgsql: Unbreak recovery test on Windows

2021-03-21 Thread Andrew Dunstan
On 3/21/21 1:06 PM, Andrew Dunstan wrote: > On 3/21/21 12:38 PM, Tom Lane wrote: >> Andrew Dunstan writes: >>> Unbreak recovery test on Windows >> Hmm, looks like this broke things on other machines. >> crake and sifaka (so far) are showing >> >> #

Re: pgsql: Unbreak recovery test on Windows

2021-03-21 Thread Andrew Dunstan
On 3/21/21 12:38 PM, Tom Lane wrote: > Andrew Dunstan writes: >> Unbreak recovery test on Windows > Hmm, looks like this broke things on other machines. > crake and sifaka (so far) are showing > > # Running: pg_ctl kill KILL 2237831 > ok 3 - killed process with KILL >

pgsql: Unbreak recovery test on Windows

2021-03-21 Thread Andrew Dunstan
Unbreak recovery test on Windows On Windows we need to send explicit quit messages to psql or the TAP tests can hang. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/677271a3a125e294b33b891669f594a2c8cb36ce Modified Files -- src/test/recovery/t/022_cras

Re: pgsql: Blindly try to fix test script's tar invocation for MSYS.

2021-03-20 Thread Andrew Dunstan
On 3/20/21 11:05 AM, Tom Lane wrote: > Andrew Dunstan writes: >> On 3/18/21 10:43 PM, Tom Lane wrote: >>> Buildfarm member fairywren doesn't like the test case I added >>> in commit 081876d75. I'm guessing the reason is that I shouldn't >>>

Re: pgsql: Blindly try to fix test script's tar invocation for MSYS.

2021-03-20 Thread Andrew Dunstan
ms like tar should get the path just as the perl script sees it. Maybe I need to add to the comments on it in TestLib.pm. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com

Re: pgsql: Allow configurable LZ4 TOAST compression.

2021-03-19 Thread Andrew Dunstan
m not quite sure how I should fix it. Maybe if it's an older version I should use the --no-toast-compression argument, but it doesn't look like it's been added to pg_dumpall unless I'm missing something. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com

pgsql: Close psql processes gracefully in recovery tests

2021-03-04 Thread Andrew Dunstan
Close psql processes gracefully in recovery tests Under windows, psql processes need to be ended explicitly, or the TAP tests hang. However, the recovery tests were doing this via IPC::Run::kill_kill(), which causes other major problems on Windows. We solve this by instead sending '\q' to psql so

Re: pgsql: pg_upgrade: Check version of target cluster binaries

2021-03-03 Thread Andrew Dunstan
rsion.pm> The invocation of pg_upgrade is at line 560. The log says: check for "/home/andrew/bf/root/upgrade.crake/REL9_2_STABLE/inst/bin/postgres" failed: incorrect version: found "postgres (PostgreSQL) 9.2.24", expected "postgres (PostgreSQL) 14deve

Re: pgsql: Add pg_alterckey utility to change the cluster key

2020-12-28 Thread Andrew Dunstan
one that is used by rhinoceros to run the SEPgsql tests. ISTM this might well be another case. I can work with you to develop such a module. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com

pgsql: Use native methods to open input in TestLib::slurp_file on Windo

2020-12-15 Thread Andrew Dunstan
Use native methods to open input in TestLib::slurp_file on Windows. This is a backport of commits 114541d58e and 6f59826f0 to the remaining live branches. Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff/da7edca4630c5bcf7c0f0f5819ab6fb020d3c845 Modified Files

pgsql: Use native methods to open input in TestLib::slurp_file on Windo

2020-12-15 Thread Andrew Dunstan
Use native methods to open input in TestLib::slurp_file on Windows. This is a backport of commits 114541d58e and 6f59826f0 to the remaining live branches. Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/f57c6cdbadd32050b860e66c4fec7823d59319da Modified Files

pgsql: Use native methods to open input in TestLib::slurp_file on Windo

2020-12-15 Thread Andrew Dunstan
Use native methods to open input in TestLib::slurp_file on Windows. This is a backport of commits 114541d58e and 6f59826f0 to the remaining live branches. Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/bf88c6d6021c1abbc73197803c98dad0f033b462 Modified Files

pgsql: Use native methods to open input in TestLib::slurp_file on Windo

2020-12-15 Thread Andrew Dunstan
Use native methods to open input in TestLib::slurp_file on Windows. This is a backport of commits 114541d58e and 6f59826f0 to the remaining live branches. Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/b5eb07ed78a0e52b392c9b64e01e044a45c1fdb6 Modified Files

pgsql: Use native methods to open input in TestLib::slurp_file on Windo

2020-12-15 Thread Andrew Dunstan
Use native methods to open input in TestLib::slurp_file on Windows. This is a backport of commits 114541d58e and 6f59826f0 to the remaining live branches. Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/355f9d2452dc93563fd89cac4b858d9e3f8e5960 Modified Files

Re: pgsql: Declare assorted array functions using anycompatible not anyelem

2020-11-11 Thread Andrew Dunstan
On 11/10/20 3:31 PM, Tom Lane wrote: > Andrew Dunstan writes: >> On 11/9/20 5:41 PM, Tom Lane wrote: >>> What I have in mind to apply to 9.5 through 13 is per attached. >> You also need to modify first_el_agg_any. > ... doh. That one is a little messier becaus

Re: pgsql: Declare assorted array functions using anycompatible not anyelem

2020-11-10 Thread Andrew Dunstan
On 11/9/20 5:41 PM, Tom Lane wrote: > > What I have in mind to apply to 9.5 through 13 is per attached. > You could either redefine the aggregate similarly in 9.2-9.4, > or just drop it. I doubt the latter leads to any interesting > loss of coverage for xversion upgrade, as there's plenty of oth

Re: pgsql: Declare assorted array functions using anycompatible not anyelem

2020-11-09 Thread Andrew Dunstan
On 11/9/20 5:15 PM, Tom Lane wrote: > Andrew Dunstan writes: >> On 11/9/20 4:29 PM, Tom Lane wrote: >>> I think probably the right fix is just to change that test case to >>> use a different implementation function, per [1]. I'm holding off >>> pus

Re: pgsql: Declare assorted array functions using anycompatible not anyelem

2020-11-09 Thread Andrew Dunstan
On 11/9/20 4:29 PM, Tom Lane wrote: > Andrew Dunstan writes: >> On 11/4/20 4:10 PM, Tom Lane wrote: >>> Declare assorted array functions using anycompatible not anyelement. >> This patch broke cross-version pg_upgrade testing. > Uh, yeah ... didn't you get

Re: pgsql: Declare assorted array functions using anycompatible not anyelem

2020-11-09 Thread Andrew Dunstan
On 11/4/20 4:10 PM, Tom Lane wrote: > Declare assorted array functions using anycompatible not anyelement. > > Convert array_append, array_prepend, array_cat, array_position, > array_positions, array_remove, array_replace, and width_bucket > to use anycompatiblearray. This is a simple extension

Re: pgsql: Doc: fill in "major enhancements" list in v13 release notes.

2020-09-14 Thread Andrew Dunstan
deletions(-) > How is it that this commit still hasn't showed up on the web site, 4 days later? <https://www.postgresql.org/docs/13/release-13.html> still shows "TBD" cheerds andrew -- Andrew Dunstanhttps://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pgsql: Collect attribute data on extension owned tables being dumped

2020-09-04 Thread Andrew Dunstan
Collect attribute data on extension owned tables being dumped If this data is not collected, pg_dump segfaults if asked for column inserts. Fix by Fabrízio de Royes Mello Backpatch to release 12 where the bug was introduced. Branch -- REL_12_STABLE Details --- https://git.postgresql.or

pgsql: Collect attribute data on extension owned tables being dumped

2020-09-04 Thread Andrew Dunstan
Collect attribute data on extension owned tables being dumped If this data is not collected, pg_dump segfaults if asked for column inserts. Fix by Fabrízio de Royes Mello Backpatch to release 12 where the bug was introduced. Branch -- REL_13_STABLE Details --- https://git.postgresql.or

pgsql: Collect attribute data on extension owned tables being dumped

2020-09-04 Thread Andrew Dunstan
Collect attribute data on extension owned tables being dumped If this data is not collected, pg_dump segfaults if asked for column inserts. Fix by Fabrízio de Royes Mello Backpatch to release 12 where the bug was introduced. Branch -- master Details --- https://git.postgresql.org/pg/co

pgsql: Enable almost all TAP tests involving symlinks on Windows

2020-07-16 Thread Andrew Dunstan
ed to permissions or to use of readlink. The relevant tests for pg_basebackup and pg_rewind are therefore adjusted accordingly. Andrew Dunstan, reviewed by Peter Eisentraut and Michael Paquier. Discussion: https://postgr.es/m/c50a646c-d9bb-7c62-a4bf-8256ff6ff...@2ndquadrant.com Branch -- master De

Re: pgsql: Remove reset of testtablespace from pg_regress on Windows

2020-07-09 Thread Andrew Dunstan
On 7/9/20 9:02 PM, Michael Paquier wrote: > On Thu, Jul 09, 2020 at 07:28:02PM -0400, Andrew Dunstan wrote: >> This patch has carefully removed the ability to run the regression tests >> as a Windows administrative user, as I just discovered. This was the >> whole point

Re: pgsql: Remove reset of testtablespace from pg_regress on Windows

2020-07-09 Thread Andrew Dunstan
6. I assume the testing referred to above was not as a privileged user. I think this should be reverted. cheers andrew -- Andrew Dunstanhttps://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pgsql: Make ssl certificate for ssl_passphrase_callback test via Makefi

2020-06-01 Thread Andrew Dunstan
Make ssl certificate for ssl_passphrase_callback test via Makefile The recipe was previously given in comments in the module's test script, but now we have an explicit recipe in the Makefile. The now redundant comments in the script are removed. This recipe shouldn't be needed in normal use, as t

Re: pgsql: Make install-tests target work with vpath builds

2020-06-01 Thread Andrew Dunstan
On 6/1/20 2:17 AM, Michael Paquier wrote: > Hi Andrew, > > On Sun, May 31, 2020 at 10:37:17PM +0000, Andrew Dunstan wrote: >> Make install-tests target work with vpath builds >> >> Also add a top-level install-tests target. >> >> Backpatch to all live bran

pgsql: Make install-tests target work with vpath builds

2020-05-31 Thread Andrew Dunstan
Make install-tests target work with vpath builds Also add a top-level install-tests target. Backpatch to all live branches. Craig Ringer, tweaked by me. Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/b9f152d25a11e535975df971e536a2e27386179a Modified Files

pgsql: Make install-tests target work with vpath builds

2020-05-31 Thread Andrew Dunstan
Make install-tests target work with vpath builds Also add a top-level install-tests target. Backpatch to all live branches. Craig Ringer, tweaked by me. Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/cb9795eb2e17a49825146bafb7c409a1c1573298 Modified Files

pgsql: Make install-tests target work with vpath builds

2020-05-31 Thread Andrew Dunstan
Make install-tests target work with vpath builds Also add a top-level install-tests target. Backpatch to all live branches. Craig Ringer, tweaked by me. Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff/bb45c5de2750f8aa5ab501aa327ababafed890d2 Modified Files

pgsql: Make install-tests target work with vpath builds

2020-05-31 Thread Andrew Dunstan
Make install-tests target work with vpath builds Also add a top-level install-tests target. Backpatch to all live branches. Craig Ringer, tweaked by me. Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/f4f4d64eafcd07880fee570e367422af757d3f02 Modified Files

pgsql: Make install-tests target work with vpath builds

2020-05-31 Thread Andrew Dunstan
Make install-tests target work with vpath builds Also add a top-level install-tests target. Backpatch to all live branches. Craig Ringer, tweaked by me. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/af4ea507c3d9217579a8d75fc17f4796a9bab0bb Modified Files --

pgsql: Make install-tests target work with vpath builds

2020-05-31 Thread Andrew Dunstan
Make install-tests target work with vpath builds Also add a top-level install-tests target. Backpatch to all live branches. Craig Ringer, tweaked by me. Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/7f92218b8a0c3b9232dbb37f6026bfeaf2346e7c Modified Files

pgsql: Rename PQsetSSLKeyPassHook and friends

2020-05-16 Thread Andrew Dunstan
Rename PQsetSSLKeyPassHook and friends 4dc6355210 provided a way for libraries and clients to modify how libpq handles client certificate passphrases, by installing a hook. However, these routines are quite specific to how OpenSSL works, so it's misleading and not future-proof to have these names

pgsql: Revert "Only provide new libpq sslpasskey hook for openssl-enabl

2020-04-17 Thread Andrew Dunstan
Revert "Only provide new libpq sslpasskey hook for openssl-enabled builds" This reverts commit 9e24109f1a4e4d8d1d372b004d6a0dd06e673fe7. This caused build errors when building without openssl, and it's simplest just to revert it. Branch -- master Details --- https://git.postgresql.org/p

Re: pgsql: Only provide openssl_tls_init_hook if building with openssl

2020-04-17 Thread Andrew Dunstan
On 4/17/20 4:32 PM, Tom Lane wrote: > Andrew Dunstan writes: >> Only provide openssl_tls_init_hook if building with openssl > One or the other of these patches broke building without --with-openssl: > > fe-secure.c:435: error: expected '=', ',', &

pgsql: Only provide openssl_tls_init_hook if building with openssl

2020-04-17 Thread Andrew Dunstan
Only provide openssl_tls_init_hook if building with openssl This should have been protected by #ifdef USE_OPENSSL in commit 896fcdb230. Per the real complaint this time from Daniel Gustafsson. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/f342d7ad03e61a1cea0339cf

Re: pgsql: Only provide new libpq sslpasskey hook for openssl-enabled build

2020-04-17 Thread Andrew Dunstan
On 4/17/20 3:27 PM, Daniel Gustafsson wrote: >> On 17 Apr 2020, at 20:19, Andrew Dunstan wrote: >> >> Only provide new libpq sslpasskey hook for openssl-enabled builds >> >> In commit 4dc6355210 I neglected to put #ifdef USE_OPENSSL around the >> declaration

pgsql: Use a slightly more liberal regex to detect Visual Studio versio

2020-04-17 Thread Andrew Dunstan
Use a slightly more liberal regex to detect Visual Studio version Apparently in some language versions of Visual Studio nmake outputs some material after the version number and before the end of the line. This has been seen in Chinese versions. Therefore, we no longer demand that the version strin

pgsql: Use a slightly more liberal regex to detect Visual Studio versio

2020-04-17 Thread Andrew Dunstan
Use a slightly more liberal regex to detect Visual Studio version Apparently in some language versions of Visual Studio nmake outputs some material after the version number and before the end of the line. This has been seen in Chinese versions. Therefore, we no longer demand that the version strin

pgsql: Use a slightly more liberal regex to detect Visual Studio versio

2020-04-17 Thread Andrew Dunstan
Use a slightly more liberal regex to detect Visual Studio version Apparently in some language versions of Visual Studio nmake outputs some material after the version number and before the end of the line. This has been seen in Chinese versions. Therefore, we no longer demand that the version strin

pgsql: Use a slightly more liberal regex to detect Visual Studio versio

2020-04-17 Thread Andrew Dunstan
Use a slightly more liberal regex to detect Visual Studio version Apparently in some language versions of Visual Studio nmake outputs some material after the version number and before the end of the line. This has been seen in Chinese versions. Therefore, we no longer demand that the version strin

pgsql: Use a slightly more liberal regex to detect Visual Studio versio

2020-04-17 Thread Andrew Dunstan
Use a slightly more liberal regex to detect Visual Studio version Apparently in some language versions of Visual Studio nmake outputs some material after the version number and before the end of the line. This has been seen in Chinese versions. Therefore, we no longer demand that the version strin

pgsql: Use a slightly more liberal regex to detect Visual Studio versio

2020-04-17 Thread Andrew Dunstan
Use a slightly more liberal regex to detect Visual Studio version Apparently in some language versions of Visual Studio nmake outputs some material after the version number and before the end of the line. This has been seen in Chinese versions. Therefore, we no longer demand that the version strin

pgsql: Only provide new libpq sslpasskey hook for openssl-enabled build

2020-04-17 Thread Andrew Dunstan
Only provide new libpq sslpasskey hook for openssl-enabled builds In commit 4dc6355210 I neglected to put #ifdef USE_OPENSSL around the declarations of the new items. This is remedied here. Per complaint from Daniel Gustafsson. Branch -- master Details --- https://git.postgresql.org/pg/

pgsql: Stop requiring an explicit return from perl subroutines

2020-04-14 Thread Andrew Dunstan
Stop requiring an explicit return from perl subroutines The consensus of the project appears to be that this provides little benefit and is simply an annoyance. Discussion: https://postgr.es/m/27481.1586618...@sss.pgh.pa.us Branch -- master Details --- https://git.postgresql.org/pg/comm

pgsql: Set Perl search path more idiomatically

2020-04-14 Thread Andrew Dunstan
Set Perl search path more idiomatically Back in commits 1df92eeafe, f884a96819, and 592123efbb I used some hackish code to set the script search path, unaware despite decades of perl that there was a completely standard way to do this. This patch changes those cases to use the standard perl FindBi

Re: pgsql: Use perl warnings pragma consistently

2020-04-13 Thread Andrew Dunstan
On 4/13/20 5:49 PM, Alvaro Herrera wrote: > On 2020-Apr-13, Tom Lane wrote: > >> Andrew Dunstan writes: >>> Use perl warnings pragma consistently >> This seems to have broken something or other, as I now get a bunch of >> warnings while building the docs: >&g

pgsql: Use perl's $/ more idiomatically

2020-04-13 Thread Andrew Dunstan
Use perl's $/ more idiomatically This replaces a few occurrences of ugly code with a more clean and idiomatic usage. The problem was highlighted by perlcritic, but we're not enforcing the policy that led to the discovery. Discussion: https://postgr.es/m/20200412074245.gb623...@rfd.leadboat.com B

pgsql: Use perl warnings pragma consistently

2020-04-13 Thread Andrew Dunstan
Use perl warnings pragma consistently We've had a mixture of the warnings pragma, the -w switch on the shebang line, and no warnings at all. This patch removes the -w swicth and add the warnings pragma to all perl sources missing it. It raises the severity of the TestingAndDebugging::RequireUseWar

pgsql: Print policy name in perlcritic messages

2020-04-13 Thread Andrew Dunstan
Print policy name in perlcritic messages This makes it easier to do a web search for details of the policy that's been violated, as well as displaying the name that might be needed for a policy override. Various perlcritic settings changes are being discussed, but this one should be uncontroversi

Re: pgsql: Allow publishing partition changes via ancestors

2020-04-09 Thread Andrew Dunstan
ublish_via_partition_root'. > > This allows replicating a partitioned table into a different partition > structure on the subscriber. prion seems to be persistently unhappy with this. It uses -DRELCACHE_FORCE_RELEASE -DCATCACHE_FORCE_RELEASE, not sure if this could affect the result.

pgsql: Msys2 tweaks for pg_validatebackup corruption test

2020-04-08 Thread Andrew Dunstan
Msys2 tweaks for pg_validatebackup corruption test 1. Tell Msys2 not to mangle the tablespace map parameter 2. If rmdir doesn't work, fall back to trying unlink on the entry in pg_tblspc. Discussion: https://postgr.es/m/7330a7c7-ce5f-9769-39a1-bdb0b32bb...@2ndquadrant.com Branch -- maste

Re: pgsql: pg_validatebackup: Adjust TAP tests to placate perlcritic.

2020-04-03 Thread Andrew Dunstan
routines added by my prior > commit 0d8c9c1210c44b36ec2efcb223a1dfbe897a3661. It was discussed here  https://postgr.es/m/caeshdjpffm_9wqnq3koy3c91forqso-fh02za9r3oemndon...@mail.gmail.com cheers andrew -- Andrew Dunstanhttps://www.2ndQuadrant.com PostgreSQL Developme

Re: pgsql: Provide a TLS init hook

2020-03-26 Thread Andrew Dunstan
On 3/26/20 11:31 AM, Tom Lane wrote: > Andrew Dunstan writes: >> On 3/26/20 9:50 AM, Tom Lane wrote: >>> Why is jacana doing it differently? >> longfin is also running it (first) here >> https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=longfin&am

Re: pgsql: Revert "initdb: Change authentication defaults"

2020-03-26 Thread Andrew Dunstan
nk we could proceed. > +1. Hamerkop has now been updated. cheers andrew -- Andrew Dunstanhttps://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: pgsql: Provide a TLS init hook

2020-03-26 Thread Andrew Dunstan
On 3/26/20 9:50 AM, Tom Lane wrote: > Andrew Dunstan writes: >> On 3/25/20 9:28 PM, Tom Lane wrote: >>> jacana has just exposed a different problem: it's not configured >>> --with-openssl, but the buildfarm script is trying to run this >>> new test modu

Re: pgsql: Provide a TLS init hook

2020-03-26 Thread Andrew Dunstan
On 3/25/20 9:28 PM, Tom Lane wrote: > Andrew Dunstan writes: >> On 3/25/20 7:44 PM, Tom Lane wrote: >>> I don't actually see why we need the localhost port at all --- it doesn't >>> look like this test ever attempts to connect to the server. So cou

pgsql: Don't listen to localhost in ssl_passphrase_callback test

2020-03-25 Thread Andrew Dunstan
Don't listen to localhost in ssl_passphrase_callback test Commit 896fcdb230 contained an unnecessary setting that listened to localhost. Since the test doesn't actually try to make an SSL connection to the database this isn't required. Moreover, it's a security hole. Per gripe from Tom Lane. Bra

Re: pgsql: Provide a TLS init hook

2020-03-25 Thread Andrew Dunstan
it doesn't > look like this test ever attempts to connect to the server. So couldn't > we just drop that? > > Seems reasonable. I just tested that and it seems quite happy, so I'll make the change. cheers andrew -- Andrew Dunstanhttps://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pgsql: Provide a TLS init hook

2020-03-25 Thread Andrew Dunstan
is provided which contains a trivial example that decodes an obfuscated password for an SSL certificate. Author: Andrew Dunstan Reviewed By: Andreas Karlsson, Asaba Takanori Discussion: https://postgr.es/m/04116472-818b-5859-1d74-3d995aab2...@2ndquadrant.com Branch -- master Details

pgsql: Turn off deprecated bison warnings under MSVC

2020-03-20 Thread Andrew Dunstan
Turn off deprecated bison warnings under MSVC These are disabled by the configure code, so this is just fixing an inconsistency in the MSVC code. Backpatch to all live branches. Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/80370836f7563653390065b225ece430

pgsql: Turn off deprecated bison warnings under MSVC

2020-03-20 Thread Andrew Dunstan
Turn off deprecated bison warnings under MSVC These are disabled by the configure code, so this is just fixing an inconsistency in the MSVC code. Backpatch to all live branches. Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/3163349fd7fe0115b021bfa1fbe49901

pgsql: Turn off deprecated bison warnings under MSVC

2020-03-20 Thread Andrew Dunstan
Turn off deprecated bison warnings under MSVC These are disabled by the configure code, so this is just fixing an inconsistency in the MSVC code. Backpatch to all live branches. Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/e8a6391fc1837416b7251f62485323af

pgsql: Turn off deprecated bison warnings under MSVC

2020-03-20 Thread Andrew Dunstan
Turn off deprecated bison warnings under MSVC These are disabled by the configure code, so this is just fixing an inconsistency in the MSVC code. Backpatch to all live branches. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/71c2fd0c04a5db5331879e23181bb52334e

pgsql: Turn off deprecated bison warnings under MSVC

2020-03-20 Thread Andrew Dunstan
Turn off deprecated bison warnings under MSVC These are disabled by the configure code, so this is just fixing an inconsistency in the MSVC code. Backpatch to all live branches. Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff/467b408321e4d3d7a753ecd8d651bf03

pgsql: Turn off deprecated bison warnings under MSVC

2020-03-20 Thread Andrew Dunstan
Turn off deprecated bison warnings under MSVC These are disabled by the configure code, so this is just fixing an inconsistency in the MSVC code. Backpatch to all live branches. Branch -- REL_12_STABLE Details --- https://git.postgresql.org/pg/commitdiff/d0747714e6ef193c16d1acf31c15f387

Re: pgsql: Revert "initdb: Change authentication defaults"

2020-03-08 Thread Andrew Dunstan
On Sat, Mar 7, 2020 at 5:42 PM Andrew Dunstan wrote: > > > > Still, this is progress. Maybe if we let the stragglers know that we're > > going to require REL_11 soon, we can get over the hump. > > > > > > > > > My 13 were counted against the

Re: pgsql: Revert "initdb: Change authentication defaults"

2020-03-06 Thread Andrew Dunstan
On 3/6/20 9:04 PM, Tom Lane wrote: > Andrew Dunstan writes: >> We're down to 13 animals behind release 11. Special thanks to Andres >> Freund and Mark Wong for updating their large collections of animals. > Cool, but I see a few more than that: > >

Re: pgsql: Revert "initdb: Change authentication defaults"

2020-03-06 Thread Andrew Dunstan
On 3/5/20 1:08 PM, Magnus Hagander wrote: > On Mon, Mar 2, 2020 at 3:36 PM Andrew Dunstan > wrote: >> >> On 3/2/20 2:05 AM, Tom Lane wrote: >>> Andrew Dunstan writes: >>>> On Sat, Feb 29, 2020 at 10:41 AM Tom Lane wrote: >>>>> Did the

Re: pgsql: Revert "initdb: Change authentication defaults"

2020-03-02 Thread Andrew Dunstan
On 3/2/20 2:05 AM, Tom Lane wrote: > Andrew Dunstan writes: >> On Sat, Feb 29, 2020 at 10:41 AM Tom Lane wrote: >>> Did the buildfarm adjustments get made? (I'm assuming Andrew knows) >> It's in Release 11 of the client and is mentioned in the release &

Re: pgsql: Revert "initdb: Change authentication defaults"

2020-03-01 Thread Andrew Dunstan
e - the buildfarm code is completely public. In this case, see https://github.com/PGBuildFarm/client-code/commit/55b4d691552607197207e4462d7c0e6d9608d3e2 cheers andrew -- Andrew Dunstanhttps://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: pgsql: Add a non-strict version of jsonb_set

2020-01-19 Thread Andrew Dunstan
Then the committer could ignore it or not as they choose. Something like that might also be valuable on the server side, since it would mean all committers would get the warning when appropriate, but it might not be worth the trouble. I agree that we don't want something server side that wo

Re: pgsql: Add a non-strict version of jsonb_set

2020-01-17 Thread Andrew Dunstan
On Fri, Jan 17, 2020 at 1:50 PM Andrew Dunstan wrote: > > > > > > > On Jan 17, 2020, at 12:44 PM, Tom Lane wrote: > > > > Andrew Dunstan writes: > >> Add a non-strict version of jsonb_set > > > > Shoulda been a catversion bump in here,

pgsql: bump catalog version as should have been done for jsonb_set_lax

2020-01-16 Thread Andrew Dunstan
bump catalog version as should have been done for jsonb_set_lax Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/4b0e0f67f2f16c077b4e5c8a3d70c6af4355db09 Modified Files -- src/include/catalog/catversion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

Re: pgsql: Add a non-strict version of jsonb_set

2020-01-16 Thread Andrew Dunstan
> On Jan 17, 2020, at 12:44 PM, Tom Lane wrote: > > Andrew Dunstan writes: >> Add a non-strict version of jsonb_set > > Shoulda been a catversion bump in here, if only for protocol's sake. > > (A useful rule of thumb is "if you won't pass the

pgsql: Add a non-strict version of jsonb_set

2020-01-16 Thread Andrew Dunstan
Add a non-strict version of jsonb_set jsonb_set_lax() is the same as jsonb_set, except that it takes and extra argument that specifies what to do if the value argument is NULL. The default is 'use_json_null'. Other possibilities are 'raise_exception', 'return_target' and 'delete_key', all these be

pgsql: Only superuser can set sslcert/sslkey in postgres_fdw user mappi

2020-01-12 Thread Andrew Dunstan
Only superuser can set sslcert/sslkey in postgres_fdw user mappings Othrwise there is a security risk. Discussion: https://postgr.es/m/20200109103014.ga4...@msg.df7cb.de Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/cebf9d6e6ee13cbf9f1a91ec633cf96780ffc985 Modif

pgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings

2020-01-09 Thread Andrew Dunstan
Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings This allows different users to authenticate with different certificates. Author: Craig Ringer Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/f5fd995a1a24e6571d26b1e29c4dc179112b1003 Modified Files ---

<    2   3   4   5   6   7   8   9   10   11   >