[COMMITTERS] pgsql: Fix whitespace

2014-09-25 Thread Peter Eisentraut
Fix whitespace Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/d11339c099fae036f4efffdc69d434c374c820b5 Modified Files -- src/backend/utils/cache/relcache.c |4 ++-- src/include/port/atomics/generic-gcc.h |1 - 2 files changed, 2 insertions(+),

[COMMITTERS] pgsql: Define META_FREE in a way that doesn't cause -Wempty-body warnin

2014-09-25 Thread Andres Freund
Define META_FREE in a way that doesn't cause -Wempty-body warnings. That get rids of the only -Wempty-body warning when compiling postgres with gcc 4.8/9. As 6550b901f shows, it's useful to be able to use that option routinely. Without asserts there's many more warnings, but that's food for anoth

[COMMITTERS] pgsql: Fix atomic ops inline x86 inline assembly for older 32bit gccs.

2014-09-25 Thread Andres Freund
Fix atomic ops inline x86 inline assembly for older 32bit gccs. Some x86 32bit versions of gcc apparently generate references to the nonexistant %sil register when using when using the r input constraint, but not with the =q constraint. The latter restricts allocations to a/b/c/d which should all

[COMMITTERS] pgsql: Fix atomic ops for x86 gcc compilers that don't understand atomi

2014-09-25 Thread Andres Freund
Fix atomic ops for x86 gcc compilers that don't understand atomic intrinsics. Per buildfarm animal locust. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/88bcdf9da5aa67da11ada0921703432ef2b7c21c Modified Files -- src/include/port/atomics/generic-gcc.h |

Re: [COMMITTERS] pgsql: Add a basic atomic ops API abstracting away platform/architectur

2014-09-25 Thread Michael Paquier
On Fri, Sep 26, 2014 at 9:16 AM, Andres Freund wrote: > On 2014-09-26 09:12:43 +0900, Michael Paquier wrote: >> On Fri, Sep 26, 2014 at 8:59 AM, Andres Freund wrote: >> > Add a basic atomic ops API abstracting away platform/architecture details. >> >> locust is not happy with this patch: >> http:

Re: [COMMITTERS] pgsql: Add a basic atomic ops API abstracting away platform/architectur

2014-09-25 Thread Andres Freund
On 2014-09-26 09:12:43 +0900, Michael Paquier wrote: > On Fri, Sep 26, 2014 at 8:59 AM, Andres Freund wrote: > > Add a basic atomic ops API abstracting away platform/architecture details. > > locust is not happy with this patch: > http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=locust&dt=2

Re: [COMMITTERS] pgsql: Add a basic atomic ops API abstracting away platform/architectur

2014-09-25 Thread Michael Paquier
On Fri, Sep 26, 2014 at 8:59 AM, Andres Freund wrote: > Add a basic atomic ops API abstracting away platform/architecture details. locust is not happy with this patch: http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=locust&dt=2014-09-26%2000%3A00%3A48 Regards, -- Michael -- Sent via pg

[COMMITTERS] pgsql: Add a basic atomic ops API abstracting away platform/architectur

2014-09-25 Thread Andres Freund
Add a basic atomic ops API abstracting away platform/architecture details. Several upcoming performance/scalability improvements require atomic operations. This new API avoids the need to splatter compiler and architecture dependent code over all the locations employing atomic ops. For several of

[COMMITTERS] pgsql: Remove ill-conceived ban on zero length json object keys.

2014-09-25 Thread Andrew Dunstan
Remove ill-conceived ban on zero length json object keys. We removed a similar ban on this in json_object recently, but the ban in datum_to_json was left, which generate4d sprutious errors in othee json generators, notable json_build_object. Along the way, add an assertion that datum_to_json is n

[COMMITTERS] pgsql: Remove ill-conceived ban on zero length json object keys.

2014-09-25 Thread Andrew Dunstan
Remove ill-conceived ban on zero length json object keys. We removed a similar ban on this in json_object recently, but the ban in datum_to_json was left, which generate4d sprutious errors in othee json generators, notable json_build_object. Along the way, add an assertion that datum_to_json is n

[COMMITTERS] pgsql: Change locking regimen around buffer replacement.

2014-09-25 Thread Robert Haas
Change locking regimen around buffer replacement. Previously, we used an lwlock that was held from the time we began seeking a candidate buffer until the time when we found and pinned one, which is disastrous for concurrency. Instead, use a spinlock which is held just long enough to pop the freel

[COMMITTERS] pgsql: Refactor space allocation for base64 encoding/decoding in pgcryp

2014-09-25 Thread Heikki Linnakangas
Refactor space allocation for base64 encoding/decoding in pgcrypto. Instead of trying to accurately calculate the space needed, use a StringInfo that's enlarged as needed. This is just moving things around currently - the old code was not wrong - but this is in preparation for a patch that adds su

[COMMITTERS] pgsql: Fix VPATH builds of the replication parser from git for some !gc

2014-09-25 Thread Andres Freund
Fix VPATH builds of the replication parser from git for some !gcc compilers. Some compilers don't automatically search the current directory for included files. 9cc2c182fc2 fixed that for builds from tarballs by adding an include to the source directory. But that doesn't work when the scanner is g

[COMMITTERS] pgsql: Fix VPATH builds of the replication parser from git for some !gc

2014-09-25 Thread Andres Freund
Fix VPATH builds of the replication parser from git for some !gcc compilers. Some compilers don't automatically search the current directory for included files. 9cc2c182fc2 fixed that for builds from tarballs by adding an include to the source directory. But that doesn't work when the scanner is g

[COMMITTERS] pgsql: Fix VPATH builds of the replication parser from git for some !gc

2014-09-25 Thread Andres Freund
Fix VPATH builds of the replication parser from git for some !gcc compilers. Some compilers don't automatically search the current directory for included files. 9cc2c182fc2 fixed that for builds from tarballs by adding an include to the source directory. But that doesn't work when the scanner is g

[COMMITTERS] pgsql: Fix VPATH builds of the replication parser from git for some !gc

2014-09-25 Thread Andres Freund
Fix VPATH builds of the replication parser from git for some !gcc compilers. Some compilers don't automatically search the current directory for included files. 9cc2c182fc2 fixed that for builds from tarballs by adding an include to the source directory. But that doesn't work when the scanner is g

[COMMITTERS] pgsql: Fix VPATH builds of the replication parser from git for some !gc

2014-09-25 Thread Andres Freund
Fix VPATH builds of the replication parser from git for some !gcc compilers. Some compilers don't automatically search the current directory for included files. 9cc2c182fc2 fixed that for builds from tarballs by adding an include to the source directory. But that doesn't work when the scanner is g

Re: [COMMITTERS] pgsql: Code review for row security.

2014-09-25 Thread Stephen Frost
* Andres Freund (and...@2ndquadrant.com) wrote: > I've not really looked at the code, but I doubt > if (policy1->hassublinks != policy2->hassublinks); > return false; > was what you intended. Note the trailing ";". Gah, quite right. Will fix. Thanks!

Re: [COMMITTERS] pgsql: Code review for row security.

2014-09-25 Thread Andres Freund
On 2014-09-24 20:33:54 +, Stephen Frost wrote: > Code review for row security. > > Buildfarm member tick identified an issue where the policies in the > relcache for a relation were were being replaced underneath a running > query, leading to segfaults while processing the policies to be added

[COMMITTERS] pgsql: Return NULL from json_object_agg if it gets no rows.

2014-09-25 Thread Andrew Dunstan
Return NULL from json_object_agg if it gets no rows. This makes it consistent with the docs and with all other builtin aggregates apart from count(). Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/ecacbdbcee67e202cfcaa1180da170b9f13654bb Modified Files

[COMMITTERS] pgsql: Return NULL from json_object_agg if it gets no rows.

2014-09-25 Thread Andrew Dunstan
Return NULL from json_object_agg if it gets no rows. This makes it consistent with the docs and with all other builtin aggregates apart from count(). Branch -- REL9_4_STABLE Details --- http://git.postgresql.org/pg/commitdiff/bda1d14360404ef58c4647888032158991051b14 Modified Files -

[COMMITTERS] pgsql: Add -D option to specify data directory to pg_controldata and pg

2014-09-25 Thread Heikki Linnakangas
Add -D option to specify data directory to pg_controldata and pg_resetxlog. It was confusing that to other commands, like initdb and postgres, you would pass the data directory with "-D datadir", but pg_controldata and pg_resetxlog would take just plain path, without the "-D". With this patch, pg_