[COMMITTERS] pgsql: Don't share SSL_CTX between libpq connections.

2016-10-07 Thread Heikki Linnakangas
Don't share SSL_CTX between libpq connections. There were several issues with the old coding: 1. There was a race condition, if two threads opened a connection at the same time. We used a mutex around SSL_CTX_* calls, but that was not enough, e.g. if one thread SSL_CTX_load_verify_locations

[COMMITTERS] pgsql: Don't share SSL_CTX between libpq connections.

2016-10-07 Thread Heikki Linnakangas
Don't share SSL_CTX between libpq connections. There were several issues with the old coding: 1. There was a race condition, if two threads opened a connection at the same time. We used a mutex around SSL_CTX_* calls, but that was not enough, e.g. if one thread SSL_CTX_load_verify_locations

[COMMITTERS] pgsql: Don't share SSL_CTX between libpq connections.

2016-10-07 Thread Heikki Linnakangas
Don't share SSL_CTX between libpq connections. There were several issues with the old coding: 1. There was a race condition, if two threads opened a connection at the same time. We used a mutex around SSL_CTX_* calls, but that was not enough, e.g. if one thread SSL_CTX_load_verify_locations

[COMMITTERS] pgsql: Don't share SSL_CTX between libpq connections.

2016-10-07 Thread Heikki Linnakangas
Don't share SSL_CTX between libpq connections. There were several issues with the old coding: 1. There was a race condition, if two threads opened a connection at the same time. We used a mutex around SSL_CTX_* calls, but that was not enough, e.g. if one thread SSL_CTX_load_verify_locations

[COMMITTERS] pgsql: Don't share SSL_CTX between libpq connections.

2016-10-07 Thread Heikki Linnakangas
Don't share SSL_CTX between libpq connections. There were several issues with the old coding: 1. There was a race condition, if two threads opened a connection at the same time. We used a mutex around SSL_CTX_* calls, but that was not enough, e.g. if one thread SSL_CTX_load_verify_locations

[COMMITTERS] pgsql: Don't share SSL_CTX between libpq connections.

2016-10-07 Thread Heikki Linnakangas
Don't share SSL_CTX between libpq connections. There were several issues with the old coding: 1. There was a race condition, if two threads opened a connection at the same time. We used a mutex around SSL_CTX_* calls, but that was not enough, e.g. if one thread SSL_CTX_load_verify_locations

[COMMITTERS] pgsql: Don't share SSL_CTX between libpq connections.

2016-10-07 Thread Heikki Linnakangas
Don't share SSL_CTX between libpq connections. There were several issues with the old coding: 1. There was a race condition, if two threads opened a connection at the same time. We used a mutex around SSL_CTX_* calls, but that was not enough, e.g. if one thread SSL_CTX_load_verify_locations

[COMMITTERS] pgsql: Clear OpenSSL error queue after failed X509_STORE_load_locations

2016-10-07 Thread Heikki Linnakangas
Clear OpenSSL error queue after failed X509_STORE_load_locations() call. Leaving the error in the error queue used to be harmless, because the X509_STORE_load_locations() call used to be the last step in initialize_SSL(), and we would clear the queue before the next SSL_connect() call. But previou

[COMMITTERS] pgsql: Clear OpenSSL error queue after failed X509_STORE_load_locations

2016-10-07 Thread Heikki Linnakangas
Clear OpenSSL error queue after failed X509_STORE_load_locations() call. Leaving the error in the error queue used to be harmless, because the X509_STORE_load_locations() call used to be the last step in initialize_SSL(), and we would clear the queue before the next SSL_connect() call. But previou

[COMMITTERS] pgsql: Clear OpenSSL error queue after failed X509_STORE_load_locations

2016-10-07 Thread Heikki Linnakangas
Clear OpenSSL error queue after failed X509_STORE_load_locations() call. Leaving the error in the error queue used to be harmless, because the X509_STORE_load_locations() call used to be the last step in initialize_SSL(), and we would clear the queue before the next SSL_connect() call. But previou

[COMMITTERS] pgsql: Clear OpenSSL error queue after failed X509_STORE_load_locations

2016-10-07 Thread Heikki Linnakangas
Clear OpenSSL error queue after failed X509_STORE_load_locations() call. Leaving the error in the error queue used to be harmless, because the X509_STORE_load_locations() call used to be the last step in initialize_SSL(), and we would clear the queue before the next SSL_connect() call. But previou

[COMMITTERS] pgsql: Clear OpenSSL error queue after failed X509_STORE_load_locations

2016-10-07 Thread Heikki Linnakangas
Clear OpenSSL error queue after failed X509_STORE_load_locations() call. Leaving the error in the error queue used to be harmless, because the X509_STORE_load_locations() call used to be the last step in initialize_SSL(), and we would clear the queue before the next SSL_connect() call. But previou

[COMMITTERS] pgsql: Clear OpenSSL error queue after failed X509_STORE_load_locations

2016-10-07 Thread Heikki Linnakangas
Clear OpenSSL error queue after failed X509_STORE_load_locations() call. Leaving the error in the error queue used to be harmless, because the X509_STORE_load_locations() call used to be the last step in initialize_SSL(), and we would clear the queue before the next SSL_connect() call. But previou

[COMMITTERS] pgsql: Clear OpenSSL error queue after failed X509_STORE_load_locations

2016-10-07 Thread Heikki Linnakangas
Clear OpenSSL error queue after failed X509_STORE_load_locations() call. Leaving the error in the error queue used to be harmless, because the X509_STORE_load_locations() call used to be the last step in initialize_SSL(), and we would clear the queue before the next SSL_connect() call. But previou

[COMMITTERS] pgsql: Don't allow both --source-server and --source-target args to pg_

2016-10-07 Thread Heikki Linnakangas
Don't allow both --source-server and --source-target args to pg_rewind. They are supposed to be mutually exclusive, but there was no check for that. Michael Banck Discussion: <[email protected]> Branch -- master Details --- http://git.postgresql.org/p

[COMMITTERS] pgsql: Don't allow both --source-server and --source-target args to pg_

2016-10-07 Thread Heikki Linnakangas
Don't allow both --source-server and --source-target args to pg_rewind. They are supposed to be mutually exclusive, but there was no check for that. Michael Banck Discussion: <[email protected]> Branch -- REL9_5_STABLE Details --- http://git.postgresq

[COMMITTERS] pgsql: Don't allow both --source-server and --source-target args to pg_

2016-10-07 Thread Heikki Linnakangas
Don't allow both --source-server and --source-target args to pg_rewind. They are supposed to be mutually exclusive, but there was no check for that. Michael Banck Discussion: <[email protected]> Branch -- REL9_6_STABLE Details --- http://git.postgresq

[COMMITTERS] pgsql: Fix pg_dump to work against pre-9.0 servers again.

2016-10-07 Thread Tom Lane
Fix pg_dump to work against pre-9.0 servers again. getBlobs' queries for pre-9.0 servers were broken in two ways: the 7.x/8.x query uses DISTINCT so it can't have unspecified-type NULLs in the target list, and both that query and the 7.0 one failed to provide the correct output column labels, so t

[COMMITTERS] pgsql: Fix pg_dump to work against pre-9.0 servers again.

2016-10-07 Thread Tom Lane
Fix pg_dump to work against pre-9.0 servers again. getBlobs' queries for pre-9.0 servers were broken in two ways: the 7.x/8.x query uses DISTINCT so it can't have unspecified-type NULLs in the target list, and both that query and the 7.0 one failed to provide the correct output column labels, so t

[COMMITTERS] pgsql: Fix python shlib probe for Cygwin.

2016-10-07 Thread Tom Lane
Fix python shlib probe for Cygwin. On buildfarm member cockatiel, that library is in /usr/bin. (Possibly we should look at $PATH on this platform?) Per off-list report from Andrew Dunstan. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/17a3a1eb0efc5d84c81e46a26fe6bd

[COMMITTERS] pgsql: Make TAP test suites to work, when @INC does not contain current

2016-10-07 Thread Heikki Linnakangas
Make TAP test suites to work, when @INC does not contain current dir. Recent Perl and/or new Linux distributions are starting to remove "." from the @INC list by default. That breaks pg_rewind and ssl test suites, which use helper perl modules that reside in the same directory. To fix, add the cur

Re: [COMMITTERS] pgsql: Make TAP test suites to work, when @INC does not contain current

2016-10-07 Thread Andres Freund
Hi, On 2016-10-07 18:50:27 +, Heikki Linnakangas wrote: > Make TAP test suites to work, when @INC does not contain current dir. > > Recent Perl and/or new Linux distributions are starting to remove "." from > the @INC list by default. That breaks pg_rewind and ssl test suites, which > use hel

[COMMITTERS] pgsql: Make TAP test suites to work, when @INC does not contain current

2016-10-07 Thread Heikki Linnakangas
Make TAP test suites to work, when @INC does not contain current dir. Recent Perl and/or new Linux distributions are starting to remove "." from the @INC list by default. That breaks pg_rewind and ssl test suites, which use helper perl modules that reside in the same directory. To fix, add the cur

[COMMITTERS] pgsql: Make TAP test suites to work, when @INC does not contain current

2016-10-07 Thread Heikki Linnakangas
Make TAP test suites to work, when @INC does not contain current dir. Recent Perl and/or new Linux distributions are starting to remove "." from the @INC list by default. That breaks pg_rewind and ssl test suites, which use helper perl modules that reside in the same directory. To fix, add the cur

[COMMITTERS] pgsql: Make TAP test suites to work, when @INC does not contain current

2016-10-07 Thread Heikki Linnakangas
Make TAP test suites to work, when @INC does not contain current dir. Recent Perl and/or new Linux distributions are starting to remove "." from the @INC list by default. That breaks pg_rewind and ssl test suites, which use helper perl modules that reside in the same directory. To fix, add the cur

Re: [COMMITTERS] pgsql: Make TAP test suites to work, when @INC does not contain current

2016-10-07 Thread Heikki Linnakangas
On 10/07/2016 09:55 PM, Andres Freund wrote: Hi, On 2016-10-07 18:50:27 +, Heikki Linnakangas wrote: Make TAP test suites to work, when @INC does not contain current dir. Recent Perl and/or new Linux distributions are starting to remove "." from the @INC list by default. That breaks pg_rew

[COMMITTERS] pgsql: Remove bogus mapping from UTF-8 to SJIS conversion table.

2016-10-07 Thread Heikki Linnakangas
Remove bogus mapping from UTF-8 to SJIS conversion table. 0xc19c is not a valid UTF-8 byte sequence. It doesn't do any harm, AFAICS, but it's surely not intentional. No backpatching though, just to be sure. In the passing, also add a file header comment to the file, like the UCS_to_SJIS.pl script

[COMMITTERS] pgsql: Fix fallback implementation of pg_atomic_write_u32().

2016-10-07 Thread Andres Freund
Fix fallback implementation of pg_atomic_write_u32(). I somehow had assumed that in the spinlock (in turn possibly using semaphores) based fallback atomics implementation 32 bit writes could be done without a lock. As far as the write goes that's correct, since postgres supports only platforms wit

[COMMITTERS] pgsql: Fix fallback implementation of pg_atomic_write_u32().

2016-10-07 Thread Andres Freund
Fix fallback implementation of pg_atomic_write_u32(). I somehow had assumed that in the spinlock (in turn possibly using semaphores) based fallback atomics implementation 32 bit writes could be done without a lock. As far as the write goes that's correct, since postgres supports only platforms wit

[COMMITTERS] pgsql: Fix fallback implementation of pg_atomic_write_u32().

2016-10-07 Thread Andres Freund
Fix fallback implementation of pg_atomic_write_u32(). I somehow had assumed that in the spinlock (in turn possibly using semaphores) based fallback atomics implementation 32 bit writes could be done without a lock. As far as the write goes that's correct, since postgres supports only platforms wit

[COMMITTERS] pgsql: libpqwalreceiver needs to link with libintl when using --enable-

2016-10-07 Thread Tom Lane
libpqwalreceiver needs to link with libintl when using --enable-nls. The need for this was previously obscured even on picky platforms by the hack we used to support direct cross-module references in the transforms contrib modules. Now that that hack is gone, the undefined symbol is exposed, as r

[COMMITTERS] pgsql: libpqwalreceiver needs to link with libintl when using --enable-

2016-10-07 Thread Tom Lane
libpqwalreceiver needs to link with libintl when using --enable-nls. The need for this was previously obscured even on picky platforms by the hack we used to support direct cross-module references in the transforms contrib modules. Now that that hack is gone, the undefined symbol is exposed, as r

[COMMITTERS] pgsql: libpqwalreceiver needs to link with libintl when using --enable-

2016-10-07 Thread Tom Lane
libpqwalreceiver needs to link with libintl when using --enable-nls. The need for this was previously obscured even on picky platforms by the hack we used to support direct cross-module references in the transforms contrib modules. Now that that hack is gone, the undefined symbol is exposed, as r