pgsql: Further fixes for ssl_passphrase_callback test module.

2020-03-25 Thread Tom Lane
Further fixes for ssl_passphrase_callback test module. The Makefile should set TAP_TESTS = 1, not implement the infrastructure for itself. For one thing, it missed the appropriate "make clean" steps. For another, the buildfarm isn't running this test because it wasn't hooked into "make installch

Re: pgsql: Provide a TLS init hook

2020-03-25 Thread Tom Lane
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 couldn't >> we just drop that? > Seems reasonable. I just tested that and it seems quite hap

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
On 3/25/20 7:44 PM, Tom Lane wrote: > I wrote: >> Concretely, I see that contrib/sslinfo has >> SHLIB_LINK += $(filter -lssl -lcrypto -lssleay32 -leay32, $(LIBS)) > I verified that that fixes things on macOS and pushed it, along with > a couple other minor fixes. Thanks. > > However, I'm quit

Re: pgsql: Provide a TLS init hook

2020-03-25 Thread Tom Lane
I wrote: > Concretely, I see that contrib/sslinfo has > SHLIB_LINK += $(filter -lssl -lcrypto -lssleay32 -leay32, $(LIBS)) I verified that that fixes things on macOS and pushed it, along with a couple other minor fixes. However, I'm quite desperately unhappy that the new test module does this: $

pgsql: Fix assorted portability issues in commit 896fcdb23.

2020-03-25 Thread Tom Lane
Fix assorted portability issues in commit 896fcdb23. Some platforms require libssl to be linked explicitly in the new SSL test module. Borrow contrib/sslinfo's code for that. Since src/test/modules/Makefile now has a variable SUBDIRS list, it needs to follow the ALWAYS_SUBDIRS protocol for that

Re: pgsql: Provide a TLS init hook

2020-03-25 Thread Tom Lane
I wrote: > Buildfarm's not terribly happy --- I suspect that the makefile for > the new test module is failing to link in libopenssl explicitly. Concretely, I see that contrib/sslinfo has SHLIB_LINK += $(filter -lssl -lcrypto -lssleay32 -leay32, $(LIBS)) which you probably need to crib here. Th

Re: pgsql: Provide a TLS init hook

2020-03-25 Thread Tom Lane
Andrew Dunstan writes: > Provide a TLS init hook Buildfarm's not terribly happy --- I suspect that the makefile for the new test module is failing to link in libopenssl explicitly. Some platforms are more forgiving of that than others. regards, tom lane

pgsql: Provide a TLS init hook

2020-03-25 Thread Andrew Dunstan
Provide a TLS init hook The default hook function sets the default password callback function. In order to allow preloaded libraries to have an opportunity to override the default, TLS initialization if now delayed slightly until after shared preloaded libraries have been loaded. A test module is

pgsql: pg_dump new test: Change order of arguments

2020-03-25 Thread Alvaro Herrera
pg_dump new test: Change order of arguments Some getopt_long implementations don't like to have a non-option argument before option arguments, so put the database name as the last switch. Per buildfarm member hoverfly. Branch -- master Details --- https://git.postgresql.org/pg/commitdif

pgsql: pg_dump: Allow dumping data of specific foreign servers

2020-03-25 Thread Alvaro Herrera
pg_dump: Allow dumping data of specific foreign servers The new command-line switch --include-foreign-data=PATTERN lets the user specify foreign servers from which to dump foreign table data. This can be refined by further inclusion/exclusion switches, so that the user has full control over which

pgsql: Go back to returning int from ereport auxiliary functions.

2020-03-25 Thread Tom Lane
Go back to returning int from ereport auxiliary functions. This reverts the parts of commit 17a28b03645e27d73bf69a95d7569b61e58f06eb that changed ereport's auxiliary functions from returning dummy integer values to returning void. It turns out that a minority of compilers complain (not entirely u

pgsql: Define EXEC_BACKEND in pg_config_manual.h

2020-03-25 Thread Peter Eisentraut
Define EXEC_BACKEND in pg_config_manual.h It was for unclear reasons defined in a separate location, which makes it more cumbersome to override for testing, and it also did not have any prominent documentation. Move to pg_config_manual.h, where similar things are already collected. The previous

pgsql: Update SQL features

2020-03-25 Thread Peter Eisentraut
Update SQL features The name of E182 was changed in SQL:2011. Also, we can change it to supported because all it requires is one embedded language to be supported, which we do. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/e8b1774fc288d7f789a539ef0a768aff2deef600