[COMMITTERS] pgsql: Fix prototype of pgwin32_bind().

2016-04-14 Thread Tom Lane
Fix prototype of pgwin32_bind(). I (tgl) had copied-and-pasted this from pgwin32_accept(), failing to notice that the third parameter should be "int" not "int *". David Rowley Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/22989a8e34168f576e0f90b16fc3edabd28c40e6

Re: [COMMITTERS] pgsql: Provide errno-translation wrappers around bind() and listen() on

2016-04-14 Thread Tom Lane
David Rowley writes: > On 13 April 2016 at 11:52, Tom Lane wrote: >> Provide errno-translation wrappers around bind() and listen() on Windows. > I'm not really sure why you made pgwin32_bind take a pointer to an > int, instead of just an int. I assume a mistake? Sheer brain fade, exacerbated by

[COMMITTERS] pgsql: Docs: clarify description of LIMIT/OFFSET behavior.

2016-04-14 Thread Tom Lane
Docs: clarify description of LIMIT/OFFSET behavior. Section 7.6 was a tad confusing because it specified what LIMIT NULL does, but neglected to do the same for OFFSET NULL, making this look like perhaps a special case or a wrong restatement of the bit about LIMIT ALL. Wordsmith a bit while at it.

Re: [HACKERS] Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold

2016-04-14 Thread Alexander Korotkov
On Thu, Apr 14, 2016 at 12:23 AM, Andres Freund wrote: > On 2016-04-13 16:05:25 -0500, Kevin Grittner wrote: > > OK, thanks. I can't think of anything else to ask for at this > > point. If you feel that you have enough to press for some > > particular course of action, go for it. > > I think we

[COMMITTERS] pgsql: Adjust datatype of ReplicationState.acquired_by.

2016-04-14 Thread Tom Lane
Adjust datatype of ReplicationState.acquired_by. It was declared as "pid_t", which would be fine except that none of the places that printed it in error messages took any thought for the possibility that it's not equivalent to "int". This leads to warnings on some buildfarm members, and could pos

[COMMITTERS] pgsql: Adjust datatype of ReplicationState.acquired_by.

2016-04-14 Thread Tom Lane
Adjust datatype of ReplicationState.acquired_by. It was declared as "pid_t", which would be fine except that none of the places that printed it in error messages took any thought for the possibility that it's not equivalent to "int". This leads to warnings on some buildfarm members, and could pos

[COMMITTERS] pgsql: Adjust signature of walrcv_receive hook.

2016-04-14 Thread Tom Lane
Adjust signature of walrcv_receive hook. Commit 314cbfc5da988eff redefined the signature of this hook as typedef int (*walrcv_receive_type) (char **buffer, int *wait_fd); But in fact the type of the "wait_fd" variable ought to be pgsocket, which is what WaitLatchOrSocket expects, and which is nec

[COMMITTERS] pgsql: Fix core dump in ReorderBufferRestoreChange on alignment-picky p

2016-04-14 Thread Tom Lane
Fix core dump in ReorderBufferRestoreChange on alignment-picky platforms. When re-reading an update involving both an old tuple and a new tuple from disk, reorderbuffer.c was careless about whether the new tuple is suitably aligned for direct access --- in general, it isn't. We'd missed seeing th

[COMMITTERS] pgsql: Fix core dump in ReorderBufferRestoreChange on alignment-picky p

2016-04-14 Thread Tom Lane
Fix core dump in ReorderBufferRestoreChange on alignment-picky platforms. When re-reading an update involving both an old tuple and a new tuple from disk, reorderbuffer.c was careless about whether the new tuple is suitably aligned for direct access --- in general, it isn't. We'd missed seeing th

[COMMITTERS] pgsql: Fix core dump in ReorderBufferRestoreChange on alignment-picky p

2016-04-14 Thread Tom Lane
Fix core dump in ReorderBufferRestoreChange on alignment-picky platforms. When re-reading an update involving both an old tuple and a new tuple from disk, reorderbuffer.c was careless about whether the new tuple is suitably aligned for direct access --- in general, it isn't. We'd missed seeing th

[COMMITTERS] pgsql: Remove trailing commas in enums.

2016-04-14 Thread Andres Freund
Remove trailing commas in enums. These aren't valid C89. Found thanks to gcc's -Wc90-c99-compat. These exist in differing places in most supported branches. Branch -- REL9_3_STABLE Details --- http://git.postgresql.org/pg/commitdiff/f1d26d3e0a7f0e1928cfb672c6c56fc342174a58 Modified File

[COMMITTERS] pgsql: Make init_spin_delay() C89 compliant #2.

2016-04-14 Thread Andres Freund
Make init_spin_delay() C89 compliant #2. My previous attempt at doing so, in 80abbeba23, was not sufficient. While that fixed the problem for bufmgr.c and lwlock.c , s_lock.c still has non-constant expressions in the struct initializer, because the file/line/function information comes from the cal

[COMMITTERS] pgsql: Remove trailing commas in enums.

2016-04-14 Thread Andres Freund
Remove trailing commas in enums. These aren't valid C89. Found thanks to gcc's -Wc90-c99-compat. These exist in differing places in most supported branches. Branch -- REL9_2_STABLE Details --- http://git.postgresql.org/pg/commitdiff/b54508596dc4202d581873a8841c72fcf3bae7a6 Modified File

[COMMITTERS] pgsql: Remove trailing commas in enums.

2016-04-14 Thread Andres Freund
Remove trailing commas in enums. These aren't valid C89. Found thanks to gcc's -Wc90-c99-compat. These exist in differing places in most supported branches. Branch -- REL9_5_STABLE Details --- http://git.postgresql.org/pg/commitdiff/593f469a048f1479d19579a06ec32cce9ddfa190 Modified File

[COMMITTERS] pgsql: Remove trailing commas in enums.

2016-04-14 Thread Andres Freund
Remove trailing commas in enums. These aren't valid C89. Found thanks to gcc's -Wc90-c99-compat. These exist in differing places in most supported branches. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/533cd2303aa6558721e76295fd1ffb05211764f9 Modified Files -

[COMMITTERS] pgsql: Fix trivial typo.

2016-04-14 Thread Andres Freund
Fix trivial typo. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/7b16781228d6c0a2db66d71e33e64b9606779feb Modified Files -- src/backend/replication/logical/logicalfuncs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Sent via pgsql-committer

[COMMITTERS] pgsql: Fix non-C89-compliant initialization of array in parallel.c.

2016-04-14 Thread Andres Freund
Fix non-C89-compliant initialization of array in parallel.c. In newer branches this was already fixed in 59202fae04. Found using clang's -Wc99-extensions. Branch -- REL9_3_STABLE Details --- http://git.postgresql.org/pg/commitdiff/6e53bb4fdca945d0867e11551bab019c555ecf26 Modified Files

[COMMITTERS] pgsql: Remove trailing commas in enums.

2016-04-14 Thread Andres Freund
Remove trailing commas in enums. These aren't valid C89. Found thanks to gcc's -Wc90-c99-compat. These exist in differing places in most supported branches. Branch -- REL9_1_STABLE Details --- http://git.postgresql.org/pg/commitdiff/ccf893c4bdef19a778a621a4290c85716a257e72 Modified File

[COMMITTERS] pgsql: Rethink \crosstabview's argument parsing logic.

2016-04-14 Thread Tom Lane
Rethink \crosstabview's argument parsing logic. \crosstabview interpreted its arguments in an unusual way, including doing case-insensitive matching of unquoted column names, which is surely not the right thing. Rip that out in favor of doing something equivalent to the dequoting/case-folding rul

[COMMITTERS] pgsql: Fix memory leak in GIN index scans.

2016-04-14 Thread Tom Lane
Fix memory leak in GIN index scans. The code had a query-lifespan memory leak when encountering GIN entries that have posting lists (rather than posting trees, ie, there are a relatively small number of heap tuples containing this index key value). With a suitable data distribution this could add

[COMMITTERS] pgsql: Fix memory leak in GIN index scans.

2016-04-14 Thread Tom Lane
Fix memory leak in GIN index scans. The code had a query-lifespan memory leak when encountering GIN entries that have posting lists (rather than posting trees, ie, there are a relatively small number of heap tuples containing this index key value). With a suitable data distribution this could add

[COMMITTERS] pgsql: Fix memory leak in GIN index scans.

2016-04-14 Thread Tom Lane
Fix memory leak in GIN index scans. The code had a query-lifespan memory leak when encountering GIN entries that have posting lists (rather than posting trees, ie, there are a relatively small number of heap tuples containing this index key value). With a suitable data distribution this could add

[COMMITTERS] pgsql: Make regression test for multiple synchronous standbys more stab

2016-04-14 Thread Fujii Masao
Make regression test for multiple synchronous standbys more stable. The regression test checks whether the output of pg_stat_replication is expected or not after changing synchronous_standby_names and reloading the configuration file. Regarding this test logic, previously there was a timing issue