[COMMITTERS] pgsql: Refactor SHA2 functions and move them to src/common/.

2017-03-07 Thread Heikki Linnakangas
Refactor SHA2 functions and move them to src/common/. This way both frontend and backends can use them. The functions are taken from pgcrypto, which now fetches the source files it needs from src/common/. A new interface is designed for the SHA2 functions, which allow linking to either OpenSSL or

[COMMITTERS] pgsql: Support SCRAM-SHA-256 authentication (RFC 5802 and 7677).

2017-03-07 Thread Heikki Linnakangas
Support SCRAM-SHA-256 authentication (RFC 5802 and 7677). This introduces a new generic SASL authentication method, similar to the GSS and SSPI methods. The server first tells the client which SASL authentication mechanism to use, and then the mechanism-specific SASL messages are exchanged in Auth

[COMMITTERS] pgsql: Add regression tests for passwords.

2017-03-07 Thread Heikki Linnakangas
Add regression tests for passwords. Michael Paquier. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/1fff35d872321015a87ca55042384b83f51dedcf Modified Files -- src/test/regress/expected/password.out | 94 ++ src/test/regres

[COMMITTERS] pgsql: Ensure ThisTimeLineID is valid before START_REPLICATION

2017-03-07 Thread Simon Riggs
Ensure ThisTimeLineID is valid before START_REPLICATION Craig Ringer Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/5ee2197767f648bc21e324e751b84d42af573b43 Modified Files -- src/backend/replication/walsender.c | 5 + 1 file changed, 5 insertions(+)

Re: [COMMITTERS] pgsql: Support SCRAM-SHA-256 authentication (RFC 5802 and 7677).

2017-03-07 Thread Amit Kapila
On Tue, Mar 7, 2017 at 5:56 PM, Heikki Linnakangas wrote: > Support SCRAM-SHA-256 authentication (RFC 5802 and 7677). > + * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + * src/backend/libpq/auth

Re: [COMMITTERS] pgsql: Support SCRAM-SHA-256 authentication (RFC 5802 and 7677).

2017-03-07 Thread Heikki Linnakangas
On 03/07/2017 03:08 PM, Amit Kapila wrote: On Tue, Mar 7, 2017 at 5:56 PM, Heikki Linnakangas wrote: Support SCRAM-SHA-256 authentication (RFC 5802 and 7677). + * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University

[COMMITTERS] pgsql: Fix comments in SCRAM-SHA-256 patch.

2017-03-07 Thread Heikki Linnakangas
Fix comments in SCRAM-SHA-256 patch. Amit Kapila. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/55acfcbffd7d11db8c10cd94ba44bfe5974894e0 Modified Files -- src/backend/libpq/auth-scram.c | 2 +- src/common/base64.c | 2 +- src/commo

[COMMITTERS] pgsql: Allow pg_dumpall to dump roles w/o user passwords

2017-03-07 Thread Simon Riggs
Allow pg_dumpall to dump roles w/o user passwords Add new option --no-role-passwords which dumps roles without passwords. Since we don’t need passwords, we choose to use pg_roles in preference to pg_authid since access may be restricted for security reasons in some configrations. Robins Tharakan

Re: [COMMITTERS] pgsql: Support SCRAM-SHA-256 authentication (RFC 5802 and 7677).

2017-03-07 Thread Peter Eisentraut
On 3/7/17 07:26, Heikki Linnakangas wrote: > Support SCRAM-SHA-256 authentication (RFC 5802 and 7677). This is probably a mistake: fe-auth.c: In function 'pg_SASL_init': fe-auth.c:453:24: error: logical 'or' of equal expressions [-Werror=logical-op] if (password == NULL || password == '\0')

[COMMITTERS] pgsql: psql: Add \gx command

2017-03-07 Thread Stephen Frost
psql: Add \gx command It can often be useful to use expanded mode output (\x) for just a single query. Introduce a \gx which acts exactly like \g except that it will force expanded output mode for that one \gx call. This is simpler than having to use \x as a toggle and also means that the user d

[COMMITTERS] pgsql: Fix parallel hash join path search.

2017-03-07 Thread Robert Haas
Fix parallel hash join path search. When the very cheapest path is not parallel-safe, we want to instead use the cheapest unparameterized path that is. The old code searched innerrel->cheapest_parameterized_paths, but that isn't right, because the path we want may not be in that list. Search inn

[COMMITTERS] pgsql: Preparatory refactoring for parallel merge join support.

2017-03-07 Thread Robert Haas
Preparatory refactoring for parallel merge join support. Extract the logic used by hash_inner_and_outer into a separate function, get_cheapest_parallel_safe_total_inner, so that it can also be used to plan parallel merge joins. Also, add a require_parallel_safe argument to the existing function g

[COMMITTERS] pgsql: Remove vestigial grammar support for CHARACTER ... CHARACTER SET

2017-03-07 Thread Tom Lane
Remove vestigial grammar support for CHARACTER ... CHARACTER SET option. The SQL standard says that you should be able to write "CHARACTER SET foo" as part of the declaration of a char-type column. We don't implement that, but a rough form of support has existed in gram.y since commit f10b63923.

[COMMITTERS] pgsql: Fix wrong word in comment.

2017-03-07 Thread Robert Haas
Fix wrong word in comment. Third time's the charm. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/cd87a5ed65f2b4f3bdf07c9664a64696c86d17be Modified Files -- src/backend/utils/adt/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Sent via

[COMMITTERS] pgsql: Document what values postgres_fdw sets for each parameter it set

2017-03-07 Thread Robert Haas
Document what values postgres_fdw sets for each parameter it sets. David Rader, reviewed by me. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/889a3f4892b271c502f74082a352447408f6292d Modified Files -- doc/src/sgml/postgres-fdw.sgml | 31 +++

Re: [COMMITTERS] pgsql: Support SCRAM-SHA-256 authentication (RFC 5802 and 7677).

2017-03-07 Thread Heikki Linnakangas
On 03/07/2017 04:07 PM, Peter Eisentraut wrote: On 3/7/17 07:26, Heikki Linnakangas wrote: Support SCRAM-SHA-256 authentication (RFC 5802 and 7677). This is probably a mistake: fe-auth.c: In function 'pg_SASL_init': fe-auth.c:453:24: error: logical 'or' of equal expressions [-Werror=logical-o

Re: [COMMITTERS] pgsql: Support SCRAM-SHA-256 authentication (RFC 5802 and 7677).

2017-03-07 Thread Tom Lane
Heikki Linnakangas writes: > I also noticed that the HPUX buildfarm members pademelon and gaur > failed, with this: > /usr/ccs/bin/ld: Unsatisfied symbols: > htonl (code) > I will look into that too. I think the critical part of their report is scram-common.c: In function `scram_Hi': scram-

[COMMITTERS] pgsql: Remove duplicated word.

2017-03-07 Thread Robert Haas
Remove duplicated word. Amit Langote Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/508dabaf39e1f66cbe3fc54d2b66f010aa59c66b Modified Files -- doc/src/sgml/ref/analyze.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Sent via pgsql-commit

[COMMITTERS] pgsql: Fix relcache reference leak.

2017-03-07 Thread Robert Haas
Fix relcache reference leak. Reported by Kevin Grittner. Faulty commit identified by Tom Lane. Patch by Amit Langote, reviewed by Michael Paquier. Discussion: http://postgr.es/m/CACjxUsOHbH1=99u8mGxmLHfy5hov4ENEpvM6=3arjos7wg7...@mail.gmail.com Branch -- master Details --- http://git.

[COMMITTERS] pgsql: Give partitioned table "p" in regression tests a less generic na

2017-03-07 Thread Robert Haas
Give partitioned table "p" in regression tests a less generic name. And don't drop it, so that we improve the coverage of the pg_upgrade regression tests. Amit Langote, per a gripe from Tom Lane Discussion: http://postgr.es/m/9071.1488863...@sss.pgh.pa.us Branch -- master Details --- h

[COMMITTERS] pgsql: Fix pgbench's failure to honor the documented long-form option "

2017-03-07 Thread Tom Lane
Fix pgbench's failure to honor the documented long-form option "--builtin". Not only did it not accept --builtin as a synonym for -b, but what it did accept as a synonym was --tpc-b (huh?), which it got even further wrong by marking as no_argument, so that if you did try that you got a core dump.

[COMMITTERS] pgsql: Fix pgbench's failure to honor the documented long-form option "

2017-03-07 Thread Tom Lane
Fix pgbench's failure to honor the documented long-form option "--builtin". Not only did it not accept --builtin as a synonym for -b, but what it did accept as a synonym was --tpc-b (huh?), which it got even further wrong by marking as no_argument, so that if you did try that you got a core dump.

[COMMITTERS] pgsql: Consider parallel merge joins.

2017-03-07 Thread Robert Haas
Consider parallel merge joins. Commit 45be99f8cd5d606086e0a458c9c72910ba8a613d took the position that performing a merge join in parallel was not likely to work out well, but this conclusion was greeted with skepticism even at the time. Whether it was true then or not, it's clearly not true any m

[COMMITTERS] pgsql: A collection of small fixes for the SCRAM patch.

2017-03-07 Thread Heikki Linnakangas
A collection of small fixes for the SCRAM patch. * Add required #includes for htonl. Per buildfarm members pademelon/gaur. * Remove unnecessary "#include ". * Fix checking for empty string in pg_SASL_init. (Reported by Peter Eisentraut and his compiler) * Move code in pg_SASL_init to match th

[COMMITTERS] pgsql: Clean up test_ifaddrs a bit.

2017-03-07 Thread Tom Lane
Clean up test_ifaddrs a bit. We customarily #include before ; according to our git history (cf commit 527f8babc) there used to be platform(s) where didn't compile otherwise. That's probably not really an issue anymore, but since test_ifaddrs.c is the one and only place in our code that's not fo

[COMMITTERS] pgsql: Invent start_proc parameters for PL/Tcl.

2017-03-07 Thread Tom Lane
Invent start_proc parameters for PL/Tcl. Define GUCs pltcl.start_proc and pltclu.start_proc. When set to a nonempty value at the time a new Tcl interpreter is created, the parameterless pltcl or pltclu function named by the GUC is called to allow user-controlled initialization to occur within the

Re: [COMMITTERS] pgsql: Fix pgbench's failure to honor the documented long-form option "

2017-03-07 Thread Fabien COELHO
Not only did it not accept --builtin as a synonym for -b, but what it did accept as a synonym was --tpc-b (huh?), which it got even further wrong by marking as no_argument, so that if you did try that you got a core dump. I suppose this is leftover from some early design for the new switches ad

[COMMITTERS] pgsql: Properly initialize variable.

2017-03-07 Thread Robert Haas
Properly initialize variable. Commit 3bc7dafa9bebbdaa1bbf0da0798d29a8bdaf6a8f forgot to do this. Noted while experimenting with valgrind. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/506f05423a7c60eef8ed8b5430d03be1fec138a2 Modified Files -- src/back

[COMMITTERS] pgsql: Improve postgresql.conf.sample comments about parallel workers.

2017-03-07 Thread Robert Haas
Improve postgresql.conf.sample comments about parallel workers. David Rowley, reviewed by Amit Kapila Discussion: http://postgr.es/m/cakjs1f8gpeupscj6ksqpvemnnx9_3zypzwskstv+8atx6vm...@mail.gmail.com Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/2b87dd8d7ae33ef5c

[COMMITTERS] pgsql: hash: Refactor hash index creation.

2017-03-07 Thread Robert Haas
hash: Refactor hash index creation. The primary goal here is to move all of the related page modifications to a single section of code, in preparation for adding write-ahead logging. In passing, rename _hash_metapinit to _hash_init, since it initializes more than just the metapage. Amit Kapila.

Re: [COMMITTERS] pgsql: Suppress compiler warnings in ecpg test on newer Windows toolcha

2017-03-07 Thread David Rowley
On 25 February 2017 at 10:45, Tom Lane wrote: > Suppress compiler warnings in ecpg test on newer Windows toolchains. > > nan_test.pgc supposed that it could unconditionally #define isnan() > and isinf() on WIN32. This was evidently copied at some point from > src/include/port/win32.h, but nowaday

[COMMITTERS] pgsql: Fix segfault in ALTER PUBLICATION/SUBSCRIPTION RENAME

2017-03-07 Thread Peter Eisentraut
Fix segfault in ALTER PUBLICATION/SUBSCRIPTION RENAME From: Masahiko Sawada Reported-by: Fujii Masao Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/b8957927e642ae15c01f985c17fd6fe00ec68069 Modified Files -- src/backend/catalog/objectaddress.c|

[COMMITTERS] pgsql: Fix grammar

2017-03-07 Thread Magnus Hagander
Fix grammar Reported by Jeremy Finzel Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/b7fa016d68b51bc385b75f9d5cffef79e5671981 Modified Files -- doc/src/sgml/wal.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Sent via pgsql-committers ma

[COMMITTERS] pgsql: Fix grammar

2017-03-07 Thread Magnus Hagander
Fix grammar Reported by Jeremy Finzel Branch -- REL9_5_STABLE Details --- http://git.postgresql.org/pg/commitdiff/68392a2af7f0b590859aad6205d1734aae3a2690 Modified Files -- doc/src/sgml/wal.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Sent via pgsql-commit

[COMMITTERS] pgsql: Fix grammar

2017-03-07 Thread Magnus Hagander
Fix grammar Reported by Jeremy Finzel Branch -- REL9_6_STABLE Details --- http://git.postgresql.org/pg/commitdiff/c6117eecec4281432f240028bc9ab3c4ad253efe Modified Files -- doc/src/sgml/wal.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Sent via pgsql-commit