pgsql: Another attempt at fixing build with various OpenSSL versions

2018-01-04 Thread Peter Eisentraut
Another attempt at fixing build with various OpenSSL versions It seems we can't easily work around the lack of X509_get_signature_nid(), so revert the previous attempts and just disable the tls-server-end-point feature if we don't have it. Branch -- master Details --- https://git.postgre

Re: pgsql: Add missing includes

2018-01-04 Thread Andres Freund
On 2018-01-04 22:58:28 +, Peter Eisentraut wrote: > Add missing includes > > is necessary to look into the X509 struct, used by > ac3ff8b1d8f98da38c53a701e6397931080a39cf. That's not sufficient here: /home/andres/src/postgresql/src/backend/libpq/be-secure-openssl.c: In function ‘be_tls_get

pgsql: Add missing includes

2018-01-04 Thread Peter Eisentraut
Add missing includes is necessary to look into the X509 struct, used by ac3ff8b1d8f98da38c53a701e6397931080a39cf. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/1834c1e432d22f9e186950c7dd8598958776e016 Modified Files -- src/backend/libpq/be-secure-ope

Re: pgsql: Add parallel-aware hash joins.

2018-01-04 Thread Thomas Munro
On Fri, Jan 5, 2018 at 5:00 AM, Tom Lane wrote: > The early returns indicate that that problem is fixed; Thanks for your help and patience with that. I've made a list over here so we don't lose track of the various things that should be improved in this area, and will start a new thread when I h

pgsql: Minor preparatory refactoring for UPDATE row movement.

2018-01-04 Thread Robert Haas
Minor preparatory refactoring for UPDATE row movement. Generalize is_partition_attr to has_partition_attrs and make it accessible from outside tablecmds.c. Change map_partition_varattnos to clarify that it can be used for mapping between any two relations in a partitioning hierarchy, not just par

pgsql: Fix build with older OpenSSL versions

2018-01-04 Thread Peter Eisentraut
Fix build with older OpenSSL versions Apparently, X509_get_signature_nid() is only in fairly new OpenSSL versions, so use the lower-level interface it is built on instead. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/ac3ff8b1d8f98da38c53a701e6397931080a39cf Modi

Re: pgsql: Implement channel binding tls-server-end-point for SCRAM

2018-01-04 Thread Thomas Munro
On Fri, Jan 5, 2018 at 9:36 AM, Peter Eisentraut wrote: > Implement channel binding tls-server-end-point for SCRAM FYI some BF animals are saying: libpq/be-secure-openssl.o: In function `be_tls_get_certificate_hash': /home/pgbuildfarm/buildroot-termite/HEAD/pgsql.build/../pgsql/src/backend/libpq

Re: pgsql: Implement channel binding tls-server-end-point for SCRAM

2018-01-04 Thread Tom Lane
Peter Eisentraut writes: > Implement channel binding tls-server-end-point for SCRAM Buildfarm doesn't like this one bit. regards, tom lane

pgsql: Fix new test case to not be endian-dependent.

2018-01-04 Thread Tom Lane
Fix new test case to not be endian-dependent. Per buildfarm. Discussion: https://postgr.es/m/[email protected] Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/0dc5dfcd7a7190739247a88c1c6249c75591effd Modified Files -

pgsql: Fix new test case to not be endian-dependent.

2018-01-04 Thread Tom Lane
Fix new test case to not be endian-dependent. Per buildfarm. Discussion: https://postgr.es/m/[email protected] Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/18869e202b74f36d504c5c3c7d9db9c186039eba Modified Files -- contr

pgsql: Simplify and encapsulate tuple routing support code.

2018-01-04 Thread Robert Haas
Simplify and encapsulate tuple routing support code. Instead of having ExecSetupPartitionTupleRouting return multiple out parameters, have it return a pointer to a structure containing all of those different things. Also, provide and use a cleanup function, ExecCleanupTupleRouting, instead of cle

pgsql: Implement channel binding tls-server-end-point for SCRAM

2018-01-04 Thread Peter Eisentraut
Implement channel binding tls-server-end-point for SCRAM This adds a second standard channel binding type for SCRAM. It is mainly intended for third-party clients that cannot implement tls-unique, for example JDBC. Author: Michael Paquier Branch -- master Details --- https://git.postg

pgsql: Fix incorrect computations of length of null bitmap in pageinspe

2018-01-04 Thread Tom Lane
Fix incorrect computations of length of null bitmap in pageinspect. Instead of using our standard macro for this calculation, this code did it itself ... and got it wrong, leading to incorrect display of the null bitmap in some cases. Noted and fixed by Maksim Milyutin. In passing, remove a usel

pgsql: Fix incorrect computations of length of null bitmap in pageinspe

2018-01-04 Thread Tom Lane
Fix incorrect computations of length of null bitmap in pageinspect. Instead of using our standard macro for this calculation, this code did it itself ... and got it wrong, leading to incorrect display of the null bitmap in some cases. Noted and fixed by Maksim Milyutin. In passing, remove a usel

pgsql: Fix incorrect computations of length of null bitmap in pageinspe

2018-01-04 Thread Tom Lane
Fix incorrect computations of length of null bitmap in pageinspect. Instead of using our standard macro for this calculation, this code did it itself ... and got it wrong, leading to incorrect display of the null bitmap in some cases. Noted and fixed by Maksim Milyutin. In passing, remove a usel

pgsql: Refactor channel binding code to fetch cbind_data only when nece

2018-01-04 Thread Peter Eisentraut
Refactor channel binding code to fetch cbind_data only when necessary As things stand now, channel binding data is fetched from OpenSSL and saved into the SCRAM exchange context for any SSL connection attempted for a SCRAM authentication, resulting in data fetched but not used if no channel bindin

Re: pgsql: Add parallel-aware hash joins.

2018-01-04 Thread Tom Lane
I wrote: > I ran a couple dozen test cycles on gaur without a failure. That's > not enough to really prove anything, but it's more successes than I was > getting before. I pushed the patch so we can see what the rest of the > buildfarm thinks. The early returns indicate that that problem is fixe

Re: pgsql: Allow ldaps when using ldap authentication

2018-01-04 Thread Peter Eisentraut
On 1/3/18 16:24, Thomas Munro wrote: > Windows documentation talks about LDAP_SSL_PORT instead. I assume > that "Vista Ultimate 6.0.6000 MSVC 2005 Pro 8.0.50727.867" doesn't > define LDAPS_PORT, but some later version added it for compatibility > with OpenLDAP. Let's just define it ourselves if i

pgsql: Define LDAPS_PORT if it's missing and disable implicit LDAPS on

2018-01-04 Thread Peter Eisentraut
Define LDAPS_PORT if it's missing and disable implicit LDAPS on Windows Some versions of Windows don't define LDAPS_PORT. Also, Windows' ldap_sslinit() is documented to use LDAPS even if you said secure=0 when the port number happens to be 636 or 3269. Let's avoid using the port number to imply

pgsql: Code review for Parallel Append.

2018-01-04 Thread Robert Haas
Code review for Parallel Append. - Remove unnecessary #include mistakenly added in execnodes.h. - Fix mistake in comment in choose_next_subplan_for_leader. - Adjust row estimates in cost_append for a possibly-different parallel divisor. - Clamp row estimates in cost_append after operations that