[COMMITTERS] pgsql: Move \crosstabview regression tests to a separate file

2016-04-08 Thread Alvaro Herrera
Move \crosstabview regression tests to a separate file It cannot run in the same parallel group as misc, because it creates a table which is unpredictably visible in that test. Per buildfarm member crake. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/1ff3f420d470f

[COMMITTERS] pgsql: Support \crosstabview in psql

2016-04-08 Thread Alvaro Herrera
Support \crosstabview in psql \crosstabview is a completely different way to display results from a query: instead of a vertical display of rows, the data values are placed in a grid where the column and row headers come from the data itself, similar to a spreadsheet. The sort order of the horizo

Re: [COMMITTERS] pgsql: Add the "snapshot too old" feature

2016-04-08 Thread Kevin Grittner
On Fri, Apr 8, 2016 at 5:04 PM, Tom Lane wrote: > Kevin Grittner writes: >> I see that there are failures on buildfarm Windows machines. >> Makefiles are not my strong suit, and I don't have access to a >> Windows machine for builds. I'll start digging, but if someone can >> help me with that, i

[COMMITTERS] pgsql: Add snapshot_too_old to NSVC @contrib_excludes

2016-04-08 Thread Kevin Grittner
Add snapshot_too_old to NSVC @contrib_excludes The buildfarm showed failure for Windows MSVC builds due to this omission. This might not be the only problem with the Makefile for this feature, but hopefully this will get it past the immediate problem. Fix suggested by Tom Lane Branch -- mas

Re: [COMMITTERS] pgsql: Add the "snapshot too old" feature

2016-04-08 Thread Tom Lane
Kevin Grittner writes: > I see that there are failures on buildfarm Windows machines. > Makefiles are not my strong suit, and I don't have access to a > Windows machine for builds. I'll start digging, but if someone can > help me with that, it would be much appreciated. I think you need to add s

Re: [COMMITTERS] pgsql: Add the "snapshot too old" feature

2016-04-08 Thread Tom Lane
Kevin Grittner writes: > Add the "snapshot too old" feature This has broken the MSVC build, evidently because you didn't connect up the new test module properly. regards, tom lane -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make chang

Re: [COMMITTERS] pgsql: Add the "snapshot too old" feature

2016-04-08 Thread Kevin Grittner
On Fri, Apr 8, 2016 at 2:45 PM, Kevin Grittner wrote: > Add the "snapshot too old" feature > src/test/modules/Makefile | 1 + > src/test/modules/snapshot_too_old/Makefile | 47 +++ > .../snapshot_too_old/expected/sto_using_cursor.out | 73 > .../snapshot_too

[COMMITTERS] pgsql: Expose more out/readfuncs support functions.

2016-04-08 Thread Andres Freund
Expose more out/readfuncs support functions. Previously bcac23d exposed a subset of support functions, namely the ones Kaigai found useful. In 20160304193704.elq773pyg5fyl...@alap3.anarazel.de I mentioned that there's some functions missing to use the facility in an external project. To avoid hav

[COMMITTERS] pgsql: Create default roles

2016-04-08 Thread Stephen Frost
Create default roles This creates an initial set of default roles which administrators may use to grant access to, historically, superuser-only functions. Using these roles instead of granting superuser access reduces the number of superuser roles required for a system. Documention for each of t

[COMMITTERS] pgsql: Reserve the "pg_" namespace for roles

2016-04-08 Thread Stephen Frost
Reserve the "pg_" namespace for roles This will prevent users from creating roles which begin with "pg_" and will check for those roles before allowing an upgrade using pg_upgrade. This will allow for default roles to be provided at initdb time. Reviews by José Luis Tallón and Robert Haas Branc

[COMMITTERS] pgsql: Fix improper usage of 'dump' bitmap

2016-04-08 Thread Stephen Frost
Fix improper usage of 'dump' bitmap Now that 'dump' is a bitmap, we can't simply set it to 'true'. Noticed while debugging the prior issue. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/fa6075e5515c6878b2c1fe1c6435dd7ed847857d Modified Files -- src/bi

[COMMITTERS] pgsql: Add the "snapshot too old" feature

2016-04-08 Thread Kevin Grittner
Add the "snapshot too old" feature This feature is controlled by a new old_snapshot_threshold GUC. A value of -1 disables the feature, and that is the default. The value of 0 is just intended for testing. Above that it is the number of minutes a snapshot can reach before pruning and vacuum are

[COMMITTERS] pgsql: Modify BufferGetPage() to prepare for "snapshot too old" feature

2016-04-08 Thread Kevin Grittner
Modify BufferGetPage() to prepare for "snapshot too old" feature This patch is a no-op patch which is intended to reduce the chances of failures of omission once the functional part of the "snapshot too old" patch goes in. It adds parameters for snapshot, relation, and an enum to specify whether

Re: [COMMITTERS] pgsql: CREATE INDEX ... INCLUDING (column[, ...])

2016-04-08 Thread Tom Lane
Anastasia Lubennikova writes: > The answer to the question about expressions is quite simple - they are not > supported by index-only scan, so having them in covering index now is just > wasting of disc space. Well, it's true that the planner can't handle them easily in IOS, but your claim that t

[COMMITTERS] pgsql: In dumpTable, re-instate the skipping logic

2016-04-08 Thread Stephen Frost
In dumpTable, re-instate the skipping logic Pretty sure I removed this based on some incorrect thinking that it was no longer possible to reach this point for a table which will not be dumped, but that's clearly wrong. Pointed out on IRC by Erik Rijkers. Branch -- master Details --- htt

Re: [COMMITTERS] pgsql: CREATE INDEX ... INCLUDING (column[, ...])

2016-04-08 Thread Anastasia Lubennikova
Peter Geoghegan-3 wrote > On Fri, Apr 8, 2016 at 11:31 AM, Robert Haas < > robertmhaas@ > > wrote: >>> I assume that the problem here is larger than just failure to adhere to >>> C89 comment style. Was this patch really ready to commit? I'm not very >>> happy that such a large patch went from "

[COMMITTERS] pgsql: Revert CREATE INDEX ... INCLUDING ...

2016-04-08 Thread Teodor Sigaev
Revert CREATE INDEX ... INCLUDING ... It's not ready yet, revert two commits 690c543550b0d2852060c18d270cdb534d339d9a - unstable test output 386e3d7609c49505e079c40c65919d99feb82505 - patch itself Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/8b99edefcab1e82c43139a

Re: [COMMITTERS] pgsql: CREATE INDEX ... INCLUDING (column[, ...])

2016-04-08 Thread Teodor Sigaev
Given those concerns, this *clearly* was not ready to commit. Please revert, Teodor. Will do, sorry. I was a bit confused with quiet discussion -- Teodor Sigaev E-mail: teo...@sigaev.ru WWW: http://www.sigaev.r

Re: [COMMITTERS] pgsql: CREATE INDEX ... INCLUDING (column[, ...])

2016-04-08 Thread Tom Lane
Peter Geoghegan writes: > On Fri, Apr 8, 2016 at 11:31 AM, Robert Haas wrote: >> +1. I wonder if this should be reverted entirely. > I really wish I could have done more to help with this, but I didn't > do enough soon enough. Regrettably, I think that the patch just isn't > ready. For example,

Re: [COMMITTERS] pgsql: CREATE INDEX ... INCLUDING (column[, ...])

2016-04-08 Thread Peter Geoghegan
On Fri, Apr 8, 2016 at 11:31 AM, Robert Haas wrote: >> I assume that the problem here is larger than just failure to adhere to >> C89 comment style. Was this patch really ready to commit? I'm not very >> happy that such a large patch went from "Needs review" to "Committed" in >> the blink of an

Re: [COMMITTERS] pgsql: CREATE INDEX ... INCLUDING (column[, ...])

2016-04-08 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > On Fri, Apr 8, 2016 at 2:29 PM, Tom Lane wrote: > > Teodor Sigaev writes: > >> CREATE INDEX ... INCLUDING (column[, ...]) > > > > Buildfarm members that don't like // comments are dying on this bit > > in tuplesort.c: > > > > state->nKeys = I

Re: [COMMITTERS] pgsql: CREATE INDEX ... INCLUDING (column[, ...])

2016-04-08 Thread Robert Haas
On Fri, Apr 8, 2016 at 2:29 PM, Tom Lane wrote: > Teodor Sigaev writes: >> CREATE INDEX ... INCLUDING (column[, ...]) > > Buildfarm members that don't like // comments are dying on this bit > in tuplesort.c: > > state->nKeys = IndexRelationGetNumberOfKeyAttributes(indexRel); > //FIXME >

Re: [COMMITTERS] pgsql: CREATE INDEX ... INCLUDING (column[, ...])

2016-04-08 Thread Tom Lane
Teodor Sigaev writes: > CREATE INDEX ... INCLUDING (column[, ...]) Buildfarm members that don't like // comments are dying on this bit in tuplesort.c: state->nKeys = IndexRelationGetNumberOfKeyAttributes(indexRel); //FIXME I assume that the problem here is larger than just failure to ad

[COMMITTERS] pgsql: Add authentication parameters compat_realm and upn_usename for S

2016-04-08 Thread Magnus Hagander
Add authentication parameters compat_realm and upn_usename for SSPI These parameters are available for SSPI authentication only, to make it possible to make it behave more like "normal gssapi", while making it possible to maintain compatibility. compat_realm is on by default, but can be turned of

[COMMITTERS] pgsql: Fix possible use of uninitialised value in ts_headline()

2016-04-08 Thread Teodor Sigaev
Fix possible use of uninitialised value in ts_headline() Found during investigation of failure of skink buildfarm member and its valgrind report. Backpatch to all supported branches Branch -- REL9_5_STABLE Details --- http://git.postgresql.org/pg/commitdiff/bf73016e01f0b9eb7c9ad1916a75d

[COMMITTERS] pgsql: Fix possible use of uninitialised value in ts_headline()

2016-04-08 Thread Teodor Sigaev
Fix possible use of uninitialised value in ts_headline() Found during investigation of failure of skink buildfarm member and its valgrind report. Backpatch to all supported branches Branch -- REL9_1_STABLE Details --- http://git.postgresql.org/pg/commitdiff/94cda4f1065bcd21bdce664dc03ea

[COMMITTERS] pgsql: Fix possible use of uninitialised value in ts_headline()

2016-04-08 Thread Teodor Sigaev
Fix possible use of uninitialised value in ts_headline() Found during investigation of failure of skink buildfarm member and its valgrind report. Backpatch to all supported branches Branch -- REL9_3_STABLE Details --- http://git.postgresql.org/pg/commitdiff/9d3fb209a07656fdee6f190013ecf

[COMMITTERS] pgsql: Fix possible use of uninitialised value in ts_headline()

2016-04-08 Thread Teodor Sigaev
Fix possible use of uninitialised value in ts_headline() Found during investigation of failure of skink buildfarm member and its valgrind report. Backpatch to all supported branches Branch -- REL9_2_STABLE Details --- http://git.postgresql.org/pg/commitdiff/d1eee9ba85be978c5b137d657dc8e

[COMMITTERS] pgsql: Fix possible use of uninitialised value in ts_headline()

2016-04-08 Thread Teodor Sigaev
Fix possible use of uninitialised value in ts_headline() Found during investigation of failure of skink buildfarm member and its valgrind report. Backpatch to all supported branches Branch -- REL9_4_STABLE Details --- http://git.postgresql.org/pg/commitdiff/b2a9e161ddb94daf3fa69e177b7e4

[COMMITTERS] pgsql: Fix possible use of uninitialised value in ts_headline()

2016-04-08 Thread Teodor Sigaev
Fix possible use of uninitialised value in ts_headline() Found during investigation of failure of skink buildfarm member and its valgrind report. Backpatch to all supported branches Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/cb0c8cbf316f9362c11d7a8356e6f459258a

[COMMITTERS] pgsql: Fix unstable regression test output.

2016-04-08 Thread Tom Lane
Fix unstable regression test output. Output order from the pg_indexes view might vary depending on the phase of the moon, so add ORDER BY to ensure stable results of tests added by commit 386e3d7609c49505e079c40c65919d99feb82505. Per buildfarm. Branch -- master Details --- http://git.pos

[COMMITTERS] pgsql: Distrust external OpenSSL clients; clear err queue

2016-04-08 Thread Peter Eisentraut
Distrust external OpenSSL clients; clear err queue OpenSSL has an unfortunate tendency to mix per-session state error handling with per-thread error handling. This can cause problems when programs that link to libpq with OpenSSL enabled have some other use of OpenSSL; without care, one caller of

[COMMITTERS] pgsql: Add BSD authentication method.

2016-04-08 Thread Tom Lane
Add BSD authentication method. Create a "bsd" auth method that works the same as "password" so far as clients are concerned, but calls the BSD Authentication service to check the password. This is currently only available on OpenBSD. Marisa Emerson, reviewed by Thomas Munro Branch -- master

[COMMITTERS] pgsql: Add combine functions for various floating-point aggregates.

2016-04-08 Thread Robert Haas
Add combine functions for various floating-point aggregates. This allows parallel aggregation to use them. It may seem surprising that we use float8_combine for both float4_accum and float8_accum transition functions, but that's because those functions differ only in the type of the non-transitio

[COMMITTERS] pgsql: Fix output of regression test of contrib/tsearch2

2016-04-08 Thread Teodor Sigaev
Fix output of regression test of contrib/tsearch2 Just forget to add in 1ec4c7c055ca045c5df6352a4cdacd9aa778e598 Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/38627f687823eae57e932c3b234656342403e909 Modified Files -- contrib/tsearch2/expected/tsearch2

[COMMITTERS] pgsql: Restore original tsquery operation numbering.

2016-04-08 Thread Teodor Sigaev
Restore original tsquery operation numbering. As noticed by Tom Lane changing operation's number in commit bb140506df605fab58f48926ee1db1f80bdafb59 causes on-disk format incompatibility. Revert to previous numbering, that is reason to add special array to store priorities of operation. Also it rev

[COMMITTERS] pgsql: Silence warning from modern perl about unescaped braces

2016-04-08 Thread Andrew Dunstan
Silence warning from modern perl about unescaped braces Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/76a1c97bf21c301f61bb41345e0cdd0d365b2086 Modified Files -- src/tools/msvc/Install.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Sent vi

[COMMITTERS] pgsql: CREATE INDEX ... INCLUDING (column[, ...])

2016-04-08 Thread Teodor Sigaev
CREATE INDEX ... INCLUDING (column[, ...]) Now indexes (but only B-tree for now) can contain "extra" column(s) which doesn't participate in index structure, they are just stored in leaf tuples. It allows to use index only scan by using single index instead of two or more indexes. Author: Anastasi

[COMMITTERS] pgsql: Replace printf format %i by %d

2016-04-08 Thread Peter Eisentraut
Replace printf format %i by %d see also ce8d7bb6440710058503d213b2aafcdf56a5b481 Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/339025c68f95d3cb2c42478109cafeaf414c7fe0 Modified Files -- contrib/pageinspect/heapfuncs.c | 4 ++-- src/backend/commands/

[COMMITTERS] pgsql: Turn down MSVC compiler verbosity

2016-04-08 Thread Andrew Dunstan
Turn down MSVC compiler verbosity Most of what is produced by the detailed verbosity level is of no interest at all, so switch to the normal level for more usable output. Christian Ullrich Backpatch to all live branches Branch -- REL9_1_STABLE Details --- http://git.postgresql.org/pg/c

[COMMITTERS] pgsql: Turn down MSVC compiler verbosity

2016-04-08 Thread Andrew Dunstan
Turn down MSVC compiler verbosity Most of what is produced by the detailed verbosity level is of no interest at all, so switch to the normal level for more usable output. Christian Ullrich Backpatch to all live branches Branch -- REL9_5_STABLE Details --- http://git.postgresql.org/pg/c

[COMMITTERS] pgsql: Turn down MSVC compiler verbosity

2016-04-08 Thread Andrew Dunstan
Turn down MSVC compiler verbosity Most of what is produced by the detailed verbosity level is of no interest at all, so switch to the normal level for more usable output. Christian Ullrich Backpatch to all live branches Branch -- master Details --- http://git.postgresql.org/pg/commitdi

[COMMITTERS] pgsql: Turn down MSVC compiler verbosity

2016-04-08 Thread Andrew Dunstan
Turn down MSVC compiler verbosity Most of what is produced by the detailed verbosity level is of no interest at all, so switch to the normal level for more usable output. Christian Ullrich Backpatch to all live branches Branch -- REL9_3_STABLE Details --- http://git.postgresql.org/pg/c

[COMMITTERS] pgsql: Turn down MSVC compiler verbosity

2016-04-08 Thread Andrew Dunstan
Turn down MSVC compiler verbosity Most of what is produced by the detailed verbosity level is of no interest at all, so switch to the normal level for more usable output. Christian Ullrich Backpatch to all live branches Branch -- REL9_2_STABLE Details --- http://git.postgresql.org/pg/c

[COMMITTERS] pgsql: Turn down MSVC compiler verbosity

2016-04-08 Thread Andrew Dunstan
Turn down MSVC compiler verbosity Most of what is produced by the detailed verbosity level is of no interest at all, so switch to the normal level for more usable output. Christian Ullrich Backpatch to all live branches Branch -- REL9_4_STABLE Details --- http://git.postgresql.org/pg/c

[COMMITTERS] pgsql: Fix printf format

2016-04-08 Thread Peter Eisentraut
Fix printf format Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/8b737f90843157706b8b5eb401b2aff08da77781 Modified Files -- contrib/pageinspect/heapfuncs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Sent via pgsql-committers mailing list

[COMMITTERS] pgsql: Fix multiple bugs in tablespace symlink removal.

2016-04-08 Thread Tom Lane
Fix multiple bugs in tablespace symlink removal. Don't try to examine S_ISLNK(st.st_mode) after a failed lstat(). It's undefined. Also, if the lstat() reported ENOENT, we do not wish that to be a hard error, but the code might nonetheless treat it as one (giving an entirely misleading error messa

[COMMITTERS] pgsql: Fix multiple bugs in tablespace symlink removal.

2016-04-08 Thread Tom Lane
Fix multiple bugs in tablespace symlink removal. Don't try to examine S_ISLNK(st.st_mode) after a failed lstat(). It's undefined. Also, if the lstat() reported ENOENT, we do not wish that to be a hard error, but the code might nonetheless treat it as one (giving an entirely misleading error messa

[COMMITTERS] pgsql: Document which aggregates support partial mode.

2016-04-08 Thread Robert Haas
Document which aggregates support partial mode. David Rowley, reviewed by Tomas Vondra Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/752b948dfca23ca8229d4490adc1d54be41c09a3 Modified Files -- doc/src/sgml/func.sgml | 64

[COMMITTERS] pgsql: Enhanced custom error in PLPythonu

2016-04-08 Thread Teodor Sigaev
Enhanced custom error in PLPythonu Patch adds a new, more rich, way to emit error message or exception from PL/Pythonu code. Author: Pavel Stehule Reviewers: Catalin Iacob, Peter Eisentraut, Jim Nasby Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/5c3c3cd0a3046339

[COMMITTERS] pgsql: Increase maximum number of clog buffers.

2016-04-08 Thread Andres Freund
Increase maximum number of clog buffers. Benchmarking has shown that the current number of clog buffers limits scalability. We've previously increased the number in 33aaa139, but that's not sufficient with a large number of clients. We've benchmarked the cost of increasing the limit by benchmarki

[COMMITTERS] pgsql: Add a 'parallel_degree' reloption.

2016-04-08 Thread Robert Haas
Add a 'parallel_degree' reloption. The code that estimates what parallel degree should be uesd for the scan of a relation is currently rather stupid, so add a parallel_degree reloption that can be used to override the planner's rather limited judgement. Julien Rouhaud, reviewed by David Rowley, J

Re: [COMMITTERS] pgsql: Phrase full text search.

2016-04-08 Thread Teodor Sigaev
Assuming that I'm right, you need to revert OP_AND/OP_OR/OP_NOT to what they were before, which means you need to give up on the assumption that the numerical values of the OP_xxx constants correspond directly to their syntactic priority. But that assumption was never going to survive the next ts

Re: [COMMITTERS] pgsql: Use quicksort, not replacement selection, for external sorting.

2016-04-08 Thread Robert Haas
On Fri, Apr 8, 2016 at 10:47 AM, Tom Lane wrote: > I wrote: >> Robert Haas writes: >>> Use quicksort, not replacement selection, for external sorting. > >> This patch evidently broke several of the Windows buildfarm critters, > > On inspection, the problem is obviously "declaration in the middle

[COMMITTERS] pgsql: Attempt to fix breakage due to declaration following code.

2016-04-08 Thread Robert Haas
Attempt to fix breakage due to declaration following code. Per Tom Lane and the buildfarm. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/b0b64f65054e6b858b845b46298a624aaaea1deb Modified Files -- src/backend/utils/sort/tuplesort.c | 10 +- 1 fil

[COMMITTERS] pgsql: Set PAM_RHOST item for PAM authentication

2016-04-08 Thread Peter Eisentraut
Set PAM_RHOST item for PAM authentication The PAM_RHOST item is set to the remote IP address or host name and can be used by PAM modules. A pg_hba.conf option is provided to choose between IP address and resolved host name. From: Grzegorz Sampolski Reviewed-by: Haribabu Kommi Branch -- ma

Re: [COMMITTERS] pgsql: Use quicksort, not replacement selection, for external sorting.

2016-04-08 Thread Tom Lane
I wrote: > Robert Haas writes: >> Use quicksort, not replacement selection, for external sorting. > This patch evidently broke several of the Windows buildfarm critters, On inspection, the problem is obviously "declaration in the middle of a code block". regards, tom lan

Re: [COMMITTERS] pgsql: Use quicksort, not replacement selection, for external sorting.

2016-04-08 Thread Tom Lane
Robert Haas writes: > Use quicksort, not replacement selection, for external sorting. This patch evidently broke several of the Windows buildfarm critters, eg on mastodon: Build FAILED. .\src\backend\utils\sort\tuplesort.c(2373): error C2143: syntax error : missing ';' before 'type' .\src\backe

Re: [COMMITTERS] pgsql: Phrase full text search.

2016-04-08 Thread Tom Lane
Teodor Sigaev writes: >> Hasn't this patch broken on-disk compatibility of type tsquery by >> renumbering the values of QueryOperator.operator? I'm looking at >> the patch delta in ts_type.h. > Distance field is placed exactly in hole between two uint8_t fields and > uint32_t > field, as I kno

[COMMITTERS] pgsql: Rename comparePos() to compareWordEntryPos()

2016-04-08 Thread Teodor Sigaev
Rename comparePos() to compareWordEntryPos() Rename comparePos() to compareWordEntryPos() to prevent export of too generic name. Per gripe from Tom Lane. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/4e55b3f0335c2aa658cd9d1fda4dea2a1f9ab80d Modified Files ---

Re: [COMMITTERS] pgsql: Phrase full text search.

2016-04-08 Thread Teodor Sigaev
Phrase full text search. Hasn't this patch broken on-disk compatibility of type tsquery by renumbering the values of QueryOperator.operator? I'm looking at the patch delta in ts_type.h. Distance field is placed exactly in hole between two uint8_t fields and uint32_t field, as I known any k

[COMMITTERS] pgsql: Add regression tests for multiple synchronous standbys.

2016-04-08 Thread Fujii Masao
Add regression tests for multiple synchronous standbys. Authors: Suraj Kharage, Michael Paquier, Masahiko Sawada, refactored by me Reviewed-By: Kyotaro Horiguchi Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/196b72fb9a5556c66f2b012cc4e869175a3049fa Modified Files