[COMMITTERS] pgsql: Add missing options to pg_regress help() output

2017-10-13 Thread Joe Conway
Add missing options to pg_regress help() output

A few command line options accepted by pg_regress were not being output
by help(), including --help itself. Add that one, as well as --version
and --bindir, and the corresponding short options for the first two.

We could consider this for backpatching, but it did not seem worthwhile
and no one else advocated for it, so apply only to master for now.

Author: Joe Conway
Reviewed-By: Tom Lane
Discussion: 
https://postgr.es/m/dd519469-06d7-2662-83ef-c926f6c4f0f1%40joeconway.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/b81eba6a650186dc35b6a1fb8bde320d9c29055d

Modified Files
--
src/test/regress/pg_regress.c | 58 +++
1 file changed, 31 insertions(+), 27 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Apply RLS policies to partitioned tables.

2017-06-11 Thread Joe Conway
On 06/11/2017 05:35 PM, Tom Lane wrote:
> Joe Conway <m...@joeconway.com> writes:
>> Apply RLS policies to partitioned tables.
> 
> Buildfarm member skink has grown a "make check" failure with this commit.
> 
> ==28150== VALGRINDERROR-BEGIN
> ==28150== Invalid read of size 8
> ==28150==at 0x39A355: ExecInitModifyTable (nodeModifyTable.c:1862)
> ==28150==by 0x37F0F8: ExecInitNode (execProcnode.c:168)
> ==28150==by 0x37C219: InitPlan (execMain.c:1044)
> ==28150==by 0x37C3AF: standard_ExecutorStart (execMain.c:256)
> ==28150==by 0x37C4B8: ExecutorStart (execMain.c:151)
> ==28150==by 0x4E: ProcessQuery (pquery.c:157)
> ==28150==by 0x4CCEDF: PortalRunMulti (pquery.c:1287)
> ==28150==by 0x4CDE19: PortalRun (pquery.c:800)
> ==28150==by 0x4C9E85: exec_simple_query (postgres.c:1099)
> ==28150==by 0x4CBF20: PostgresMain (postgres.c:4087)
> ==28150==by 0x44DC04: BackendRun (postmaster.c:4331)
> ==28150==by 0x44FD9B: BackendStartup (postmaster.c:4003)
> ==28150==  Address 0xbbdbec8 is 8,008 bytes inside a recently re-allocated 
> block of size 8,192 alloc'd
> ==28150==at 0x4C2AB76: malloc (vg_replace_malloc.c:299)
> ==28150==by 0x6002D2: AllocSetAlloc (aset.c:760)
> ==28150==by 0x606EB5: MemoryContextAllocZeroAligned (mcxt.c:791)
> ==28150==by 0x3832B1: CreateExecutorState (execUtils.c:99)
> ==28150==by 0x37C2E6: standard_ExecutorStart (execMain.c:186)
> ==28150==by 0x37C4B8: ExecutorStart (execMain.c:151)
> ==28150==by 0x4E: ProcessQuery (pquery.c:157)
> ==28150==by 0x4CCEDF: PortalRunMulti (pquery.c:1287)
> ==28150==by 0x4CDE19: PortalRun (pquery.c:800)
> ==28150==by 0x4C9E85: exec_simple_query (postgres.c:1099)
> ==28150==by 0x4CBF20: PostgresMain (postgres.c:4087)
> ==28150==by 0x44DC04: BackendRun (postmaster.c:4331)
> ==28150== 
> ==28150== VALGRINDERROR-END
> 
> The cited line is the ExecInitQual call here:
> 
> /* varno = node->nominalRelation */
> mapped_wcoList = map_partition_varattnos(wcoList,
>  node->nominalRelation,
>  partrel, rel);
> foreach(ll, mapped_wcoList)
> {
> WithCheckOption *wco = (WithCheckOption *) lfirst(ll);
> ExprState  *wcoExpr = ExecInitQual((List *) wco->qual,
>mtstate->mt_plans[i]);
> 
> wcoExprs = lappend(wcoExprs, wcoExpr);
> }
> 
> First guess is that map_partition_varattnos has forgotten to handle
> WithCheckOption.qual.  If so, though, and if that's not resulting
> in visible misbehavior in the regression tests, then we are missing
> a case that the regression tests should be covering.
> 
> BTW, it might be advisable to use castNode(WithCheckOption, ...)
> in the line before that.

Drat. I'll take a look, but it would probably be good if someone
generally familiar with the partitioned tables patches have a look as well.

Joe


-- 
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development



signature.asc
Description: OpenPGP digital signature


[COMMITTERS] pgsql: Apply RLS policies to partitioned tables.

2017-06-11 Thread Joe Conway
Apply RLS policies to partitioned tables.

The new partitioned table capability added a new relkind, namely
RELKIND_PARTITIONED_TABLE. Update fireRIRrules() to apply RLS
policies on RELKIND_PARTITIONED_TABLE as it does RELKIND_RELATION.

In addition, add RLS regression test coverage for partitioned tables.

Issue raised by Fakhroutdinov Evgenievich and patch by Mike Palmiotto.
Regression test editorializing by me.

Discussion: 
https://postgr.es/m/flat/20170601065959.1486.69...@wrigleys.postgresql.org

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/4f7a95be2c112bdc8da5f7e46cbb743b8ba4cc21

Modified Files
--
src/backend/rewrite/rewriteHandler.c  |   3 +-
src/test/regress/expected/rowsecurity.out | 428 ++
src/test/regress/sql/rowsecurity.sql  | 142 ++
3 files changed, 572 insertions(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix contrib/sepgsql regr tests for tup-routing constraint check

2017-06-07 Thread Joe Conway
Fix contrib/sepgsql regr tests for tup-routing constraint check change.

Commit 15ce775 changed tuple-routing constraint checking logic.
This affects the expected output for contrib/sepgsql, because
there's no longer LOG entries reporting allowance of int4eq()
execution. Per buildfarm.

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/06c0afe56e7aa6e8ab9ea2dd92bac2220201affe

Modified Files
--
contrib/sepgsql/expected/misc.out | 2 --
1 file changed, 2 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix ancient connection leak in dblink

2017-03-11 Thread Joe Conway
Fix ancient connection leak in dblink

When using unnamed connections with dblink, every time a new
connection is made, the old one is leaked. Fix that.

This has been an issue probably since dblink was first committed.
Someone complained almost ten years ago, but apparently I decided
not to pursue it at the time, and neither did anyone else, so it
slipped between the cracks. Now that someone else has complained,
fix in all supported branches.

Discussion: (orig) 
https://postgr.es/m/flat/F680AB59-6D6F-4026-9599-1BE28880273D%40decibel.org#f680ab59-6d6f-4026-9599-1be288802...@decibel.org
Discussion: (new) 
https://postgr.es/m/flat/0A3221C70F24FB45833433255569204D1F6ADF8C@G01JPEXMBYT05
Reported by: Jim Nasby and Takayuki Tsunakawa

Branch
--
REL9_4_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/166dfb3a903eee25637b846a87a4a63c67d5e796

Modified Files
--
contrib/dblink/dblink.c | 4 
1 file changed, 4 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix ancient connection leak in dblink

2017-03-11 Thread Joe Conway
Fix ancient connection leak in dblink

When using unnamed connections with dblink, every time a new
connection is made, the old one is leaked. Fix that.

This has been an issue probably since dblink was first committed.
Someone complained almost ten years ago, but apparently I decided
not to pursue it at the time, and neither did anyone else, so it
slipped between the cracks. Now that someone else has complained,
fix in all supported branches.

Discussion: (orig) 
https://postgr.es/m/flat/F680AB59-6D6F-4026-9599-1BE28880273D%40decibel.org#f680ab59-6d6f-4026-9599-1be288802...@decibel.org
Discussion: (new) 
https://postgr.es/m/flat/0A3221C70F24FB45833433255569204D1F6ADF8C@G01JPEXMBYT05
Reported by: Jim Nasby and Takayuki Tsunakawa

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/cd1e23e93bc12b7d084dc2acf9f80e9ea1f1e6de

Modified Files
--
contrib/dblink/dblink.c | 4 
1 file changed, 4 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix ancient connection leak in dblink

2017-03-11 Thread Joe Conway
Fix ancient connection leak in dblink

When using unnamed connections with dblink, every time a new
connection is made, the old one is leaked. Fix that.

This has been an issue probably since dblink was first committed.
Someone complained almost ten years ago, but apparently I decided
not to pursue it at the time, and neither did anyone else, so it
slipped between the cracks. Now that someone else has complained,
fix in all supported branches.

Discussion: (orig) 
https://postgr.es/m/flat/F680AB59-6D6F-4026-9599-1BE28880273D%40decibel.org#f680ab59-6d6f-4026-9599-1be288802...@decibel.org
Discussion: (new) 
https://postgr.es/m/flat/0A3221C70F24FB45833433255569204D1F6ADF8C@G01JPEXMBYT05
Reported by: Jim Nasby and Takayuki Tsunakawa

Branch
--
REL9_2_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/c4613c3f496957ee5a203674bab66a5e53d06834

Modified Files
--
contrib/dblink/dblink.c | 4 
1 file changed, 4 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix ancient connection leak in dblink

2017-03-11 Thread Joe Conway
Fix ancient connection leak in dblink

When using unnamed connections with dblink, every time a new
connection is made, the old one is leaked. Fix that.

This has been an issue probably since dblink was first committed.
Someone complained almost ten years ago, but apparently I decided
not to pursue it at the time, and neither did anyone else, so it
slipped between the cracks. Now that someone else has complained,
fix in all supported branches.

Discussion: (orig) 
https://postgr.es/m/flat/F680AB59-6D6F-4026-9599-1BE28880273D%40decibel.org#f680ab59-6d6f-4026-9599-1be288802...@decibel.org
Discussion: (new) 
https://postgr.es/m/flat/0A3221C70F24FB45833433255569204D1F6ADF8C@G01JPEXMBYT05
Reported by: Jim Nasby and Takayuki Tsunakawa

Branch
--
REL9_3_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/f6cfc14e5ad3b8e5309615f8f7d15f55ba238f97

Modified Files
--
contrib/dblink/dblink.c | 4 
1 file changed, 4 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix ancient connection leak in dblink

2017-03-11 Thread Joe Conway
Fix ancient connection leak in dblink

When using unnamed connections with dblink, every time a new
connection is made, the old one is leaked. Fix that.

This has been an issue probably since dblink was first committed.
Someone complained almost ten years ago, but apparently I decided
not to pursue it at the time, and neither did anyone else, so it
slipped between the cracks. Now that someone else has complained,
fix in all supported branches.

Discussion: (orig) 
https://postgr.es/m/flat/F680AB59-6D6F-4026-9599-1BE28880273D%40decibel.org#f680ab59-6d6f-4026-9599-1be288802...@decibel.org
Discussion: (new) 
https://postgr.es/m/flat/0A3221C70F24FB45833433255569204D1F6ADF8C@G01JPEXMBYT05
Reported by: Jim Nasby and Takayuki Tsunakawa

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/82f3792a4f576a34495c6b65ba103941f0b69f49

Modified Files
--
contrib/dblink/dblink.c | 4 
1 file changed, 4 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix ancient connection leak in dblink

2017-03-11 Thread Joe Conway
Fix ancient connection leak in dblink

When using unnamed connections with dblink, every time a new
connection is made, the old one is leaked. Fix that.

This has been an issue probably since dblink was first committed.
Someone complained almost ten years ago, but apparently I decided
not to pursue it at the time, and neither did anyone else, so it
slipped between the cracks. Now that someone else has complained,
fix in all supported branches.

Discussion: (orig) 
https://postgr.es/m/flat/F680AB59-6D6F-4026-9599-1BE28880273D%40decibel.org#f680ab59-6d6f-4026-9599-1be288802...@decibel.org
Discussion: (new) 
https://postgr.es/m/flat/0A3221C70F24FB45833433255569204D1F6ADF8C@G01JPEXMBYT05
Reported by: Jim Nasby and Takayuki Tsunakawa

Branch
--
REL9_6_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/8469923f3ea893ee0261a234e2e5136663064d52

Modified Files
--
contrib/dblink/dblink.c | 4 
1 file changed, 4 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Silence compiler warnings

2017-01-02 Thread Joe Conway
Silence compiler warnings

Rearrange a bit of code to ensure that 'mode' in LWLockRelease is
obviously always set, which seems a bit cleaner and avoids a compiler
warning (thanks to Robert for the suggestion!).

Back-patch back to 9.5 where the warning is first seen.

Author: Stephen Frost
Discussion: https://postgr.es/m/20161129152102.GR13284%40tamriel.snowman.net

Branch
--
REL9_6_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/5099e8ee23641abc8437d98555b63158e75a8a55

Modified Files
--
src/backend/storage/lmgr/lwlock.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Silence compiler warnings

2017-01-02 Thread Joe Conway
Silence compiler warnings

Rearrange a bit of code to ensure that 'mode' in LWLockRelease is
obviously always set, which seems a bit cleaner and avoids a compiler
warning (thanks to Robert for the suggestion!).

Back-patch back to 9.5 where the warning is first seen.

Author: Stephen Frost
Discussion: https://postgr.es/m/20161129152102.GR13284%40tamriel.snowman.net

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/cbc62b22952006324199979396d229ce82f6a0d7

Modified Files
--
src/backend/storage/lmgr/lwlock.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: ilence compiler warnings

2017-01-02 Thread Joe Conway
ilence compiler warnings

In GetCachedPlan(), initialize 'plan' to silence a compiler warning, but
also add an Assert() to make sure we don't ever actually fall through
with 'plan' still being set to NULL, since we are about to dereference
it.

Back-patch back to 9.2.

Author: Stephen Frost
Discussion: https://postgr.es/m/20161129152102.GR13284%40tamriel.snowman.net

Branch
--
REL9_2_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/fce04516ec5e34dcad18d1dc60e1373a292c218e

Modified Files
--
src/backend/utils/cache/plancache.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Silence compiler warnings

2017-01-02 Thread Joe Conway
Silence compiler warnings

In GetCachedPlan(), initialize 'plan' to silence a compiler warning, but
also add an Assert() to make sure we don't ever actually fall through
with 'plan' still being set to NULL, since we are about to dereference
it.

Back-patch back to 9.2.

Author: Stephen Frost
Discussion: https://postgr.es/m/20161129152102.GR13284%40tamriel.snowman.net

Branch
--
REL9_6_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/7911e78f6cc5a51f4d41589542140eee00b3f10d

Modified Files
--
src/backend/utils/cache/plancache.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Silence compiler warnings

2017-01-02 Thread Joe Conway
Silence compiler warnings

In GetCachedPlan(), initialize 'plan' to silence a compiler warning, but
also add an Assert() to make sure we don't ever actually fall through
with 'plan' still being set to NULL, since we are about to dereference
it.

Back-patch back to 9.2.

Author: Stephen Frost
Discussion: https://postgr.es/m/20161129152102.GR13284%40tamriel.snowman.net

Branch
--
REL9_4_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/8cb9d01829825e55c5637db40f5cd0690111cf09

Modified Files
--
src/backend/utils/cache/plancache.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Silence compiler warnings

2017-01-02 Thread Joe Conway
Silence compiler warnings

In GetCachedPlan(), initialize 'plan' to silence a compiler warning, but
also add an Assert() to make sure we don't ever actually fall through
with 'plan' still being set to NULL, since we are about to dereference
it.

Back-patch back to 9.2.

Author: Stephen Frost
Discussion: https://postgr.es/m/20161129152102.GR13284%40tamriel.snowman.net

Branch
--
REL9_3_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/6b4a1764aa5dfece5020b78beb56ffde66bd1b21

Modified Files
--
src/backend/utils/cache/plancache.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Silence compiler warnings

2017-01-02 Thread Joe Conway
Silence compiler warnings

In GetCachedPlan(), initialize 'plan' to silence a compiler warning, but
also add an Assert() to make sure we don't ever actually fall through
with 'plan' still being set to NULL, since we are about to dereference
it.

Back-patch back to 9.2.

Author: Stephen Frost
Discussion: https://postgr.es/m/20161129152102.GR13284%40tamriel.snowman.net

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/35d4dd82c2e82d2bc0e51174b5cfb5ac30061a81

Modified Files
--
src/backend/utils/cache/plancache.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Silence Bison deprecation warnings

2017-01-02 Thread Joe Conway
Silence Bison deprecation warnings

Bison >=3.0 issues warnings about

%name-prefix="base_yy"

instead of the now preferred

%name-prefix "base_yy"

but the latter doesn't work with Bison 2.3 or less.  So for now we
silence the deprecation warnings.

Back-patch to 9.2 and 9.3 -- the newer branches already have this fix.

Author: Peter Eisentraut
Discussion: https://postgr.es/m/677.1483384145%40sss.pgh.pa.us

Branch
--
REL9_2_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/b12b1743b48a7b7753098be342754477e6129921

Modified Files
--
config/programs.m4 | 8 
configure  | 8 
2 files changed, 16 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Silence Bison deprecation warnings

2017-01-02 Thread Joe Conway
Silence Bison deprecation warnings

Bison >=3.0 issues warnings about

%name-prefix="base_yy"

instead of the now preferred

%name-prefix "base_yy"

but the latter doesn't work with Bison 2.3 or less.  So for now we
silence the deprecation warnings.

Back-patch to 9.2 and 9.3 -- the newer branches already have this fix.

Author: Peter Eisentraut
Discussion: https://postgr.es/m/677.1483384145%40sss.pgh.pa.us

Branch
--
REL9_3_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/3f9479603caca249fb3643871c24c6fa55a339b4

Modified Files
--
config/programs.m4 | 8 
configure  | 8 
2 files changed, 16 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Improve RLS documentation with respect to COPY

2016-12-22 Thread Joe Conway
Improve RLS documentation with respect to COPY

Documentation for pg_restore said COPY TO does not support row security
when in fact it should say COPY FROM. Fix that.

While at it, make it clear that "COPY FROM" does not allow RLS to be
enabled and INSERT should be used instead. Also that SELECT policies
will apply to COPY TO statements.

Back-patch to 9.5 where RLS first appeared.

Author: Joe Conway
Reviewed-By: Dean Rasheed and Robert Haas
Discussion: https://postgr.es/m/5744FA24.3030008%40joeconway.com

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/53afdef662ef77a3f27fc36dbc0472f855069fd3

Modified Files
--
doc/src/sgml/ref/copy.sgml   | 9 +
doc/src/sgml/ref/pg_dump.sgml| 5 +
doc/src/sgml/ref/pg_restore.sgml | 2 +-
3 files changed, 15 insertions(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Improve RLS documentation with respect to COPY

2016-12-22 Thread Joe Conway
Improve RLS documentation with respect to COPY

Documentation for pg_restore said COPY TO does not support row security
when in fact it should say COPY FROM. Fix that.

While at it, make it clear that "COPY FROM" does not allow RLS to be
enabled and INSERT should be used instead. Also that SELECT policies
will apply to COPY TO statements.

Back-patch to 9.5 where RLS first appeared.

Author: Joe Conway
Reviewed-By: Dean Rasheed and Robert Haas
Discussion: https://postgr.es/m/5744FA24.3030008%40joeconway.com

Branch
--
REL9_6_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/51e9df7a1005fc7748c71cd359431f2a41ea678d

Modified Files
--
doc/src/sgml/ref/copy.sgml   | 9 +
doc/src/sgml/ref/pg_dump.sgml| 5 +
doc/src/sgml/ref/pg_restore.sgml | 2 +-
3 files changed, 15 insertions(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Improve RLS documentation with respect to COPY

2016-12-22 Thread Joe Conway
Improve RLS documentation with respect to COPY

Documentation for pg_restore said COPY TO does not support row security
when in fact it should say COPY FROM. Fix that.

While at it, make it clear that "COPY FROM" does not allow RLS to be
enabled and INSERT should be used instead. Also that SELECT policies
will apply to COPY TO statements.

Back-patch to 9.5 where RLS first appeared.

Author: Joe Conway
Reviewed-By: Dean Rasheed and Robert Haas
Discussion: https://postgr.es/m/5744FA24.3030008%40joeconway.com

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/0a85c102254b72ec7ce16bc504206a1a5c84bd76

Modified Files
--
doc/src/sgml/ref/copy.sgml   | 9 +
doc/src/sgml/ref/pg_dump.sgml| 5 +
doc/src/sgml/ref/pg_restore.sgml | 2 +-
3 files changed, 15 insertions(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Make dblink try harder to form useful error messages

2016-12-22 Thread Joe Conway
Make dblink try harder to form useful error messages

When libpq encounters a connection-level error, e.g. runs out of memory
while forming a result, there will be no error associated with PGresult,
but a message will be placed into PGconn's error buffer. postgres_fdw
takes care to use the PGconn error message when PGresult does not have
one, but dblink has been negligent in that regard. Modify dblink to mirror
what postgres_fdw has been doing.

Back-patch to all supported branches.

Author: Joe Conway
Reviewed-By: Tom Lane
Discussion: 
https://postgr.es/m/02fa2d90-2efd-00bc-fefc-c23c00eb671e%40joeconway.com

Branch
--
REL9_3_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/9b8507bfae9119427a5c3acf037c466a7e3d7046

Modified Files
--
contrib/dblink/dblink.c | 31 ++-
1 file changed, 22 insertions(+), 9 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Make dblink try harder to form useful error messages

2016-12-22 Thread Joe Conway
Make dblink try harder to form useful error messages

When libpq encounters a connection-level error, e.g. runs out of memory
while forming a result, there will be no error associated with PGresult,
but a message will be placed into PGconn's error buffer. postgres_fdw
takes care to use the PGconn error message when PGresult does not have
one, but dblink has been negligent in that regard. Modify dblink to mirror
what postgres_fdw has been doing.

Back-patch to all supported branches.

Author: Joe Conway
Reviewed-By: Tom Lane
Discussion: 
https://postgr.es/m/02fa2d90-2efd-00bc-fefc-c23c00eb671e%40joeconway.com

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/2f802d95b4904dbed3dfdca1b3a607cd085d2e20

Modified Files
--
contrib/dblink/dblink.c | 31 ++-
1 file changed, 22 insertions(+), 9 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Make dblink try harder to form useful error messages

2016-12-22 Thread Joe Conway
Make dblink try harder to form useful error messages

When libpq encounters a connection-level error, e.g. runs out of memory
while forming a result, there will be no error associated with PGresult,
but a message will be placed into PGconn's error buffer. postgres_fdw
takes care to use the PGconn error message when PGresult does not have
one, but dblink has been negligent in that regard. Modify dblink to mirror
what postgres_fdw has been doing.

Back-patch to all supported branches.

Author: Joe Conway
Reviewed-By: Tom Lane
Discussion: 
https://postgr.es/m/02fa2d90-2efd-00bc-fefc-c23c00eb671e%40joeconway.com

Branch
--
REL9_4_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/76943f54a743e3d7875a6772fec89bb57a8f2118

Modified Files
--
contrib/dblink/dblink.c | 31 ++-
1 file changed, 22 insertions(+), 9 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Make dblink try harder to form useful error messages

2016-12-22 Thread Joe Conway
Make dblink try harder to form useful error messages

When libpq encounters a connection-level error, e.g. runs out of memory
while forming a result, there will be no error associated with PGresult,
but a message will be placed into PGconn's error buffer. postgres_fdw
takes care to use the PGconn error message when PGresult does not have
one, but dblink has been negligent in that regard. Modify dblink to mirror
what postgres_fdw has been doing.

Back-patch to all supported branches.

Author: Joe Conway
Reviewed-By: Tom Lane
Discussion: 
https://postgr.es/m/02fa2d90-2efd-00bc-fefc-c23c00eb671e%40joeconway.com

Branch
--
REL9_6_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/51126ccdb1ce720b674405e11bcb5e7b8fa902fb

Modified Files
--
contrib/dblink/dblink.c | 31 ++-
1 file changed, 22 insertions(+), 9 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Make dblink try harder to form useful error messages

2016-12-22 Thread Joe Conway
Make dblink try harder to form useful error messages

When libpq encounters a connection-level error, e.g. runs out of memory
while forming a result, there will be no error associated with PGresult,
but a message will be placed into PGconn's error buffer. postgres_fdw
takes care to use the PGconn error message when PGresult does not have
one, but dblink has been negligent in that regard. Modify dblink to mirror
what postgres_fdw has been doing.

Back-patch to all supported branches.

Author: Joe Conway
Reviewed-By: Tom Lane
Discussion: 
https://postgr.es/m/02fa2d90-2efd-00bc-fefc-c23c00eb671e%40joeconway.com

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/80ca22aa60a6138b5ada890339dd6a6e2397222d

Modified Files
--
contrib/dblink/dblink.c | 31 ++-
1 file changed, 22 insertions(+), 9 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Make dblink try harder to form useful error messages

2016-12-22 Thread Joe Conway
Make dblink try harder to form useful error messages

When libpq encounters a connection-level error, e.g. runs out of memory
while forming a result, there will be no error associated with PGresult,
but a message will be placed into PGconn's error buffer. postgres_fdw
takes care to use the PGconn error message when PGresult does not have
one, but dblink has been negligent in that regard. Modify dblink to mirror
what postgres_fdw has been doing.

Back-patch to all supported branches.

Author: Joe Conway
Reviewed-By: Tom Lane
Discussion: 
https://postgr.es/m/02fa2d90-2efd-00bc-fefc-c23c00eb671e%40joeconway.com

Branch
--
REL9_2_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/44de099f89c2a2d94c78f80f09555fd9b5792583

Modified Files
--
contrib/dblink/dblink.c | 31 ++-
1 file changed, 22 insertions(+), 9 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Protect dblink from invalid options when using postgres_fdw serv

2016-12-22 Thread Joe Conway
Protect dblink from invalid options when using postgres_fdw server

When dblink uses a postgres_fdw server name for its connection, it
is possible for the connection to have options that are invalid
with dblink (e.g. "updatable"). The recommended way to avoid this
problem is to use dblink_fdw servers instead. However there are use
cases for using postgres_fdw, and possibly other FDWs, for dblink
connection options, therefore protect against trying to use any
options that do not apply by using is_valid_dblink_option() when
building the connection string from the options.

Back-patch to 9.3. Although 9.2 supports FDWs for connection info,
is_valid_dblink_option() did not yet exist, and neither did
postgres_fdw, at least in the postgres source tree. Given the lack
of previous complaints, fixing that seems too invasive/not worth it.

Author: Corey Huinker
Reviewed-By: Joe Conway
Discussion: 
https://postgr.es/m/CADkLM%3DfWyXVEyYcqbcRnxcHutkP45UHU9WD7XpdZaMfe7S%3DRwA%40mail.gmail.com

Branch
--
REL9_6_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/150841fb94f651a8e452d7a452c3225c2dafdf16

Modified Files
--
contrib/dblink/dblink.c | 35 +--
1 file changed, 29 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Protect dblink from invalid options when using postgres_fdw serv

2016-12-22 Thread Joe Conway
Protect dblink from invalid options when using postgres_fdw server

When dblink uses a postgres_fdw server name for its connection, it
is possible for the connection to have options that are invalid
with dblink (e.g. "updatable"). The recommended way to avoid this
problem is to use dblink_fdw servers instead. However there are use
cases for using postgres_fdw, and possibly other FDWs, for dblink
connection options, therefore protect against trying to use any
options that do not apply by using is_valid_dblink_option() when
building the connection string from the options.

Back-patch to 9.3. Although 9.2 supports FDWs for connection info,
is_valid_dblink_option() did not yet exist, and neither did
postgres_fdw, at least in the postgres source tree. Given the lack
of previous complaints, fixing that seems too invasive/not worth it.

Author: Corey Huinker
Reviewed-By: Joe Conway
Discussion: 
https://postgr.es/m/CADkLM%3DfWyXVEyYcqbcRnxcHutkP45UHU9WD7XpdZaMfe7S%3DRwA%40mail.gmail.com

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/c4448683893bd37b59003603bc9075d362e81b5a

Modified Files
--
contrib/dblink/dblink.c | 35 +--
1 file changed, 29 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Protect dblink from invalid options when using postgres_fdw serv

2016-12-22 Thread Joe Conway
Protect dblink from invalid options when using postgres_fdw server

When dblink uses a postgres_fdw server name for its connection, it
is possible for the connection to have options that are invalid
with dblink (e.g. "updatable"). The recommended way to avoid this
problem is to use dblink_fdw servers instead. However there are use
cases for using postgres_fdw, and possibly other FDWs, for dblink
connection options, therefore protect against trying to use any
options that do not apply by using is_valid_dblink_option() when
building the connection string from the options.

Back-patch to 9.3. Although 9.2 supports FDWs for connection info,
is_valid_dblink_option() did not yet exist, and neither did
postgres_fdw, at least in the postgres source tree. Given the lack
of previous complaints, fixing that seems too invasive/not worth it.

Author: Corey Huinker
Reviewed-By: Joe Conway
Discussion: 
https://postgr.es/m/CADkLM%3DfWyXVEyYcqbcRnxcHutkP45UHU9WD7XpdZaMfe7S%3DRwA%40mail.gmail.com

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/d5c05f27a43fd0bc777b13dd50de203bade2118d

Modified Files
--
contrib/dblink/dblink.c | 35 +--
1 file changed, 29 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Protect dblink from invalid options when using postgres_fdw serv

2016-12-22 Thread Joe Conway
Protect dblink from invalid options when using postgres_fdw server

When dblink uses a postgres_fdw server name for its connection, it
is possible for the connection to have options that are invalid
with dblink (e.g. "updatable"). The recommended way to avoid this
problem is to use dblink_fdw servers instead. However there are use
cases for using postgres_fdw, and possibly other FDWs, for dblink
connection options, therefore protect against trying to use any
options that do not apply by using is_valid_dblink_option() when
building the connection string from the options.

Back-patch to 9.3. Although 9.2 supports FDWs for connection info,
is_valid_dblink_option() did not yet exist, and neither did
postgres_fdw, at least in the postgres source tree. Given the lack
of previous complaints, fixing that seems too invasive/not worth it.

Author: Corey Huinker
Reviewed-By: Joe Conway
Discussion: 
https://postgr.es/m/CADkLM%3DfWyXVEyYcqbcRnxcHutkP45UHU9WD7XpdZaMfe7S%3DRwA%40mail.gmail.com

Branch
--
REL9_3_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/bd46cce21476792c71952e23543bd943b160d0f1

Modified Files
--
contrib/dblink/dblink.c | 35 +--
1 file changed, 29 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Protect dblink from invalid options when using postgres_fdw serv

2016-12-22 Thread Joe Conway
Protect dblink from invalid options when using postgres_fdw server

When dblink uses a postgres_fdw server name for its connection, it
is possible for the connection to have options that are invalid
with dblink (e.g. "updatable"). The recommended way to avoid this
problem is to use dblink_fdw servers instead. However there are use
cases for using postgres_fdw, and possibly other FDWs, for dblink
connection options, therefore protect against trying to use any
options that do not apply by using is_valid_dblink_option() when
building the connection string from the options.

Back-patch to 9.3. Although 9.2 supports FDWs for connection info,
is_valid_dblink_option() did not yet exist, and neither did
postgres_fdw, at least in the postgres source tree. Given the lack
of previous complaints, fixing that seems too invasive/not worth it.

Author: Corey Huinker
Reviewed-By: Joe Conway
Discussion: 
https://postgr.es/m/CADkLM%3DfWyXVEyYcqbcRnxcHutkP45UHU9WD7XpdZaMfe7S%3DRwA%40mail.gmail.com

Branch
--
REL9_4_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/cb687e0acfdfa3699e4b19b597aba37f686b9f16

Modified Files
--
contrib/dblink/dblink.c | 35 +--
1 file changed, 29 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Improve dblink error message when remote does not provide it

2016-12-21 Thread Joe Conway
Improve dblink error message when remote does not provide it

When dblink or postgres_fdw detects an error on the remote side of the
connection, it will try to construct a local error message as best it
can using libpq's PQresultErrorField(). When no primary message is
available, it was bailing out with an unhelpful "unknown error". Make
that message better and more style guide compliant. Per discussion
on hackers.

Backpatch to 9.2 except postgres_fdw which didn't exist before 9.3.

Discussion: https://postgr.es/m/19872.1482338965%40sss.pgh.pa.us

Branch
--
REL9_4_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/0f5b1867c2e6b752336f0b32d05f94c424664f79

Modified Files
--
contrib/dblink/dblink.c   | 2 +-
contrib/postgres_fdw/connection.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Improve dblink error message when remote does not provide it

2016-12-21 Thread Joe Conway
Improve dblink error message when remote does not provide it

When dblink or postgres_fdw detects an error on the remote side of the
connection, it will try to construct a local error message as best it
can using libpq's PQresultErrorField(). When no primary message is
available, it was bailing out with an unhelpful "unknown error". Make
that message better and more style guide compliant. Per discussion
on hackers.

Backpatch to 9.2 except postgres_fdw which didn't exist before 9.3.

Discussion: https://postgr.es/m/19872.1482338965%40sss.pgh.pa.us

Branch
--
REL9_6_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/88673c9d3bc72004367e3317175cb873584405bf

Modified Files
--
contrib/dblink/dblink.c   | 2 +-
contrib/postgres_fdw/connection.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Improve dblink error message when remote does not provide it

2016-12-21 Thread Joe Conway
Improve dblink error message when remote does not provide it

When dblink or postgres_fdw detects an error on the remote side of the
connection, it will try to construct a local error message as best it
can using libpq's PQresultErrorField(). When no primary message is
available, it was bailing out with an unhelpful "unknown error". Make
that message better and more style guide compliant. Per discussion
on hackers.

Backpatch to 9.2 except postgres_fdw which didn't exist before 9.3.

Discussion: https://postgr.es/m/19872.1482338965%40sss.pgh.pa.us

Branch
--
REL9_3_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/3272be3468956eedb9e18a5e1dc9eef352663152

Modified Files
--
contrib/dblink/dblink.c   | 2 +-
contrib/postgres_fdw/connection.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Improve dblink error message when remote does not provide it

2016-12-21 Thread Joe Conway
Improve dblink error message when remote does not provide it

When dblink or postgres_fdw detects an error on the remote side of the
connection, it will try to construct a local error message as best it
can using libpq's PQresultErrorField(). When no primary message is
available, it was bailing out with an unhelpful "unknown error". Make
that message better and more style guide compliant. Per discussion
on hackers.

Backpatch to 9.2 except postgres_fdw which didn't exist before 9.3.

Discussion: https://postgr.es/m/19872.1482338965%40sss.pgh.pa.us

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/28c9b6be7f76d64397bfa39a944915d4dbfd1994

Modified Files
--
contrib/dblink/dblink.c   | 2 +-
contrib/postgres_fdw/connection.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Improve dblink error message when remote does not provide it

2016-12-21 Thread Joe Conway
Improve dblink error message when remote does not provide it

When dblink or postgres_fdw detects an error on the remote side of the
connection, it will try to construct a local error message as best it
can using libpq's PQresultErrorField(). When no primary message is
available, it was bailing out with an unhelpful "unknown error". Make
that message better and more style guide compliant. Per discussion
on hackers.

Backpatch to 9.2 except postgres_fdw which didn't exist before 9.3.

Discussion: https://postgr.es/m/19872.1482338965%40sss.pgh.pa.us

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/ea0aa9698cfa74bb04cf53d813924fe67f278c30

Modified Files
--
contrib/dblink/dblink.c   | 2 +-
contrib/postgres_fdw/connection.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Improve dblink error message when remote does not provide it

2016-12-21 Thread Joe Conway
Improve dblink error message when remote does not provide it

When dblink or postgres_fdw detects an error on the remote side of the
connection, it will try to construct a local error message as best it
can using libpq's PQresultErrorField(). When no primary message is
available, it was bailing out with an unhelpful "unknown error". Make
that message better and more style guide compliant. Per discussion
on hackers.

Backpatch to 9.2 except postgres_fdw which didn't exist before 9.3.

Discussion: https://postgr.es/m/19872.1482338965%40sss.pgh.pa.us

Branch
--
REL9_2_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/fb0ab06dc4f4c90b85c220418445f4c8f15a59ca

Modified Files
--
contrib/dblink/dblink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Make get_controlfile() error logging consistent with src/common

2016-03-07 Thread Joe Conway
Make get_controlfile() error logging consistent with src/common

As originally committed, get_controlfile() used a non-standard approach
to error logging. Make it consistent with the majority of error logging
done in src/common.

Applies to master only.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/7b077af5000cb94b8547b62ee45697cf6bf806ef

Modified Files
--
src/common/controldata_utils.c | 40 +++-
1 file changed, 23 insertions(+), 17 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Expose control file data via SQL accessible functions.

2016-03-05 Thread Joe Conway
Expose control file data via SQL accessible functions.

Add four new SQL accessible functions: pg_control_system(),
pg_control_checkpoint(), pg_control_recovery(), and pg_control_init()
which expose a subset of the control file data.

Along the way move the code to read and validate the control file to
src/common, where it can be shared by the new backend functions
and the original pg_controldata frontend program.

Patch by me, significant input, testing, and review by Michael Paquier.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/dc7d70ea05deca9dfc6a25043d406b57cc8f6c30

Modified Files
--
doc/src/sgml/func.sgml  | 356 
src/backend/utils/misc/Makefile |   2 +-
src/backend/utils/misc/pg_controldata.c | 341 ++
src/bin/pg_controldata/pg_controldata.c | 162 ++-
src/common/Makefile |   4 +-
src/common/controldata_utils.c  | 100 +
src/include/catalog/catversion.h|   2 +-
src/include/catalog/pg_proc.h   |  13 ++
src/include/common/controldata_utils.h  |  15 ++
src/include/utils/builtins.h|   6 +
src/tools/msvc/Mkvcbuild.pm |   4 +-
11 files changed, 900 insertions(+), 105 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Cosmetic improvements in new config_info code.

2016-02-21 Thread Joe Conway
On 02/21/2016 08:38 AM, Tom Lane wrote:
> Coverity griped about use of unchecked strcpy() into a local variable.
> There's unlikely to be any actual bug there, since no caller would be
> passing a path longer than MAXPGPATH, but nonetheless use of strlcpy()
> seems preferable.

FWIW, strcpy() was being used in src/bin/pg_config/pg_config.c that I
started with -- does that mean we are not getting Coverity coverage of
src/bin?

> While at it, get rid of unmaintainable separation between list of
> field names and list of field values in favor of initializing them
> in parallel.

I waffled back and forth about doing something similar and apparently
landed on the wrong side of it :-). I'll take a similar tack with the
controldata patch that I'm trying to get over the finish line.

Joe

-- 
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development



signature.asc
Description: OpenPGP digital signature


Re: [COMMITTERS] pgsql: Add pg_size_bytes() to parse human-readable size strings.

2016-02-20 Thread Joe Conway
On 02/20/2016 02:32 AM, Vik Fearing wrote:
> On 02/20/2016 11:17 AM, Dean Rasheed wrote:
>> On 20 February 2016 at 10:12, Michael Paquier  
>> wrote:
>>> Happy first commit.
>>
>> Arg. Not so much.
>>
>> Looks like I broke something -- looking into it now :-(
> 
> Happy first commit anyway!
> 

+1

-- 
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development



signature.asc
Description: OpenPGP digital signature


Re: [COMMITTERS] pgsql: Add new system view, pg_config

2016-02-17 Thread Joe Conway
On 02/17/2016 10:09 AM, Tom Lane wrote:
> Joe Conway <m...@joeconway.com> writes:
>> Add new system view, pg_config
> 
> Several members of the buildfarm are not happy with this ...
> it's not immediately obvious why.
> 
>   regards, tom lane

Sorry -- should be fixed now. I inadvertently changed the behavior of
pg_config binary when I refactored such that when individual items were
requested, the "NAME = " was prepended similar to when all configs are
emitted, which broke PGXS builds and undoubtedly other stuff too.

Joe

-- 
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development



signature.asc
Description: OpenPGP digital signature


[COMMITTERS] pgsql: Revert inadvertant change in pg_config behavior

2016-02-17 Thread Joe Conway
Revert inadvertant change in pg_config behavior

In commit a5c43b88 the behavior of command line pg_config was
inadvertantly changed to include the config name when specific
configs are requested, similar to when none are requested and
all are emitted. This breaks scripts that expect to use
pg_config for e.g. PGXS. Revert the behavior to the previous.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/fc8a81e3e73e30ac083cc60837ecf98b33d5cc7e

Modified Files
--
src/bin/pg_config/pg_config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Add new system view, pg_config

2016-02-17 Thread Joe Conway
On 02/17/2016 09:45 AM, Joe Conway wrote:
> On 02/17/2016 09:12 AM, Joe Conway wrote:
>> Add new system view, pg_config
>>
>> Move and refactor the underlying code for the pg_config client
>> application to src/common in support of sharing it with a new
>> system information SRF called pg_config() which makes the same
>> information available via SQL. Additionally wrap the SRF with a
>> new system view, as called pg_config.
>>
>> Patch by me with extensive input and review by Michael Paquier
>> and additional review by Alvaro Herrera.
> 
> Hmmm, somehow this commit seems to have broken PGXS, although I'm not
> yet sure how. Investigating...

Ok, I see it now. Will fix ASAP.

Joe

-- 
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development



signature.asc
Description: OpenPGP digital signature


Re: [COMMITTERS] pgsql: Add new system view, pg_config

2016-02-17 Thread Joe Conway
On 02/17/2016 09:12 AM, Joe Conway wrote:
> Add new system view, pg_config
> 
> Move and refactor the underlying code for the pg_config client
> application to src/common in support of sharing it with a new
> system information SRF called pg_config() which makes the same
> information available via SQL. Additionally wrap the SRF with a
> new system view, as called pg_config.
> 
> Patch by me with extensive input and review by Michael Paquier
> and additional review by Alvaro Herrera.

Hmmm, somehow this commit seems to have broken PGXS, although I'm not
yet sure how. Investigating...

Joe

-- 
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development



signature.asc
Description: OpenPGP digital signature


[COMMITTERS] pgsql: Add new system view, pg_config

2016-02-17 Thread Joe Conway
Add new system view, pg_config

Move and refactor the underlying code for the pg_config client
application to src/common in support of sharing it with a new
system information SRF called pg_config() which makes the same
information available via SQL. Additionally wrap the SRF with a
new system view, as called pg_config.

Patch by me with extensive input and review by Michael Paquier
and additional review by Alvaro Herrera.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/a5c43b886942e96ec5c745041f2d6a50c3205147

Modified Files
--
doc/src/sgml/catalogs.sgml   |  52 +
src/backend/catalog/system_views.sql |   6 +
src/backend/utils/misc/Makefile  |   4 +-
src/backend/utils/misc/pg_config.c   | 103 +
src/bin/pg_config/Makefile   |  14 --
src/bin/pg_config/pg_config.c| 429 ---
src/common/Makefile  |  19 +-
src/common/config_info.c | 206 +
src/include/catalog/catversion.h |   2 +-
src/include/catalog/pg_proc.h|   4 +
src/include/common/config_info.h |  21 ++
src/include/port.h   |   1 +
src/include/utils/builtins.h |   3 +
src/port/path.c  |  30 +++
src/test/regress/expected/rules.out  |   3 +
src/tools/msvc/Mkvcbuild.pm  |   4 +-
16 files changed, 491 insertions(+), 410 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Move DATA entry to correct position

2016-02-15 Thread Joe Conway
Move DATA entry to correct position

In commit 7b4bfc87 the DATA and DESCR entries for the new
row_security_active() function were inadvertantly put after
the PROVOLATILE defines, rather than before as they should
have been placed. Move them up where they belong.

Backpatch to 9.5 where the new entries were introduced.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/851636bfdaa9aa62d5adfaa0aa8c06b408e0d8a9

Modified Files
--
src/include/catalog/pg_proc.h | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Move DATA entry to correct position

2016-02-15 Thread Joe Conway
Move DATA entry to correct position

In commit 7b4bfc87 the DATA and DESCR entries for the new
row_security_active() function were inadvertantly put after
the PROVOLATILE defines, rather than before as they should
have been placed. Move them up where they belong.

Backpatch to 9.5 where the new entries were introduced.

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/73ca21c7ac2aa44f88b6ddb4cc4fc43cb2067e5e

Modified Files
--
src/include/catalog/pg_proc.h | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Correct Copyright year from 2015 to 2016

2016-02-15 Thread Joe Conway
Correct Copyright year from 2015 to 2016

Looks like this patch went in after Copyright messages
were updated for 2016 and it missed the boat. Fixed.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/cfafd8beadcd6f8c8a570ab2504a75c33c58e504

Modified Files
--
src/include/storage/standbydefs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Change delimiter used for display of NextXID

2016-02-12 Thread Joe Conway
Change delimiter used for display of NextXID

NextXID has been rendered in the form of a pg_lsn even though it
really is not. This can cause confusion, so change the format from
%u/%u to %u:%u, per discussion on hackers.

Complaint by me, patch by me and Bruce, reviewed by Michael Paquier
and Alvaro. Applied to HEAD only.

Author: Joe Conway, Bruce Momjian
Reviewed-by: Michael Paquier, Alvaro Herrera
Backpatch-through: master

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/59a884e9854cb3cb7338394fb5f856209b040fb3

Modified Files
--
src/backend/access/rmgrdesc/xlogdesc.c  |  2 +-
src/backend/access/transam/xlog.c   |  2 +-
src/bin/pg_controldata/pg_controldata.c |  2 +-
src/bin/pg_resetxlog/pg_resetxlog.c |  2 +-
src/bin/pg_upgrade/controldata.c| 11 +--
5 files changed, 13 insertions(+), 6 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Rename (new|old)estCommitTs to (new|old)estCommitTsXid

2015-12-28 Thread Joe Conway
Rename (new|old)estCommitTs to (new|old)estCommitTsXid

The variables newestCommitTs and oldestCommitTs sound as if they are
timestamps, but in fact they are the transaction Ids that correspond
to the newest and oldest timestamps rather than the actual timestamps.
Rename these variables to reflect that they are actually xids: to wit
newestCommitTsXid and oldestCommitTsXid respectively. Also modify
related code in a similar fashion, particularly the user facing output
emitted by pg_controldata and pg_resetxlog.

Complaint and patch by me, review by Tom Lane and Alvaro Herrera.
Backpatch to 9.5 where these variables were first introduced.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/241448b23adf3432988f2b4012ff90a338b4d0bf

Modified Files
--
src/backend/access/rmgrdesc/xlogdesc.c  |4 +--
src/backend/access/transam/commit_ts.c  |   52 +++
src/backend/access/transam/xlog.c   |   16 +-
src/backend/commands/vacuum.c   |2 +-
src/bin/pg_controldata/pg_controldata.c |8 ++---
src/bin/pg_resetxlog/pg_resetxlog.c |   44 +-
src/include/access/commit_ts.h  |2 +-
src/include/access/transam.h|4 +--
src/include/catalog/pg_control.h|4 +--
9 files changed, 68 insertions(+), 68 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Rename (new|old)estCommitTs to (new|old)estCommitTsXid

2015-12-28 Thread Joe Conway
Rename (new|old)estCommitTs to (new|old)estCommitTsXid

The variables newestCommitTs and oldestCommitTs sound as if they are
timestamps, but in fact they are the transaction Ids that correspond
to the newest and oldest timestamps rather than the actual timestamps.
Rename these variables to reflect that they are actually xids: to wit
newestCommitTsXid and oldestCommitTsXid respectively. Also modify
related code in a similar fashion, particularly the user facing output
emitted by pg_controldata and pg_resetxlog.

Complaint and patch by me, review by Tom Lane and Alvaro Herrera.
Backpatch to 9.5 where these variables were first introduced.

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/282fdfcdc8a8f987c06e839d581b94bf196def8a

Modified Files
--
src/backend/access/rmgrdesc/xlogdesc.c  |4 +--
src/backend/access/transam/commit_ts.c  |   52 +++
src/backend/access/transam/xlog.c   |   16 +-
src/backend/commands/vacuum.c   |2 +-
src/bin/pg_controldata/pg_controldata.c |8 ++---
src/bin/pg_resetxlog/pg_resetxlog.c |   44 +-
src/include/access/commit_ts.h  |2 +-
src/include/access/transam.h|4 +--
src/include/catalog/pg_control.h|4 +--
9 files changed, 68 insertions(+), 68 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix sepgsql regression tests (9.2-only patch).

2015-09-22 Thread Joe Conway
Fix sepgsql regression tests (9.2-only patch).

The regression tests for sepgsql were broken by changes in the
base distro as-shipped policies. Specifically, definition of
unconfined_t in the system default policy was changed to bypass
multi-category rules, which the regression test depended on.
Fix that by defining a custom privileged domain
(sepgsql_regtest_superuser_t) and using it instead of system's
unconfined_t domain. The new sepgsql_regtest_superuser_t domain
performs almost like the current unconfined_t, but restricted by
multi-category policy as the traditional unconfined_t was.

The custom policy module is a self defined domain, and so should not
be affected by related future system policy changes. However, it still
uses the unconfined_u:unconfined_r pair for selinux-user and role.
Those definitions have not been changed for several years and seem
less risky to rely on than the unconfined_t domain. Additionally, if
we define custom user/role, they would need to be manually defined
at the operating system level, adding more complexity to an already
non-standard and complex regression test.

Applies only to 9.2. Unlike the previous similar patch, commit 794e2558b,
this also fixes a bug related to processing SELECT INTO statement.
Because v9.2 didn't have ObjectAccessPostCreate to inform the context
when a relation is newly created, sepgsql had an alternative method.
However, related code in sepgsql_object_access() neglected to consider
T_CreateTableAsStmt, thus no label was assigned on the new relation.
This logic was removed and replaced starting in 9.3.

Patch by Kohei KaiGai.

Branch
--
REL9_2_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/e90a629e126b9459b1f1d8ee8aa8c8598dc36b16

Modified Files
--
contrib/sepgsql/expected/ddl.out   |  208 ++--
contrib/sepgsql/expected/dml.out   |6 +-
contrib/sepgsql/expected/label.out |  106 +-
contrib/sepgsql/hooks.c|1 +
contrib/sepgsql/launcher   |2 +-
contrib/sepgsql/sepgsql-regtest.te |   98 ++---
contrib/sepgsql/sql/ddl.sql|2 +-
contrib/sepgsql/sql/dml.sql|2 +-
contrib/sepgsql/sql/label.sql  |   20 ++--
9 files changed, 255 insertions(+), 190 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Adjust sepgsql regression output for recent error context change

2015-09-06 Thread Joe Conway
Adjust sepgsql regression output for recent error context change

Recent commit 0426f349e changed handling of error context reports
in such a way to have a minor effect on the sepgsql regression
output. Adapt the expected output file to suit. Since that commit
was HEAD only, so is this one.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/03543afe1529b437e2f6861eab15f9d71debdba7

Modified Files
--
contrib/sepgsql/expected/label.out |1 +
1 file changed, 1 insertion(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix sepgsql regression tests.

2015-08-30 Thread Joe Conway
Fix sepgsql regression tests.

The regression tests for sepgsql were broken by changes in the
base distro as-shipped policies. Specifically, definition of
unconfined_t in the system default policy was changed to bypass
multi-category rules, which the regression test depended on.
Fix that by defining a custom privileged domain
(sepgsql_regtest_superuser_t) and using it instead of system's
unconfined_t domain. The new sepgsql_regtest_superuser_t domain
performs almost like the current unconfined_t, but restricted by
multi-category policy as the traditional unconfined_t was.

The custom policy module is a self defined domain, and so should not
be affected by related future system policy changes. However, it still
uses the unconfined_u:unconfined_r pair for selinux-user and role.
Those definitions have not been changed for several years and seem
less risky to rely on than the unconfined_t domain. Additionally, if
we define custom user/role, they would need to be manually defined
at the operating system level, adding more complexity to an already
non-standard and complex regression test.

Back-patch to 9.3. The regression tests will need more work before
working correctly on 9.2. Starting with 9.2, sepgsql has had dependencies
on libselinux versions that are only available on newer distros with
the changed set of policies (e.g. RHEL 7.x). On 9.1 sepgsql works
fine with the older distros with original policy set (e.g. RHEL 6.x),
and on which the existing regression tests work fine. We might want
eventually change 9.1 sepgsql regression tests to be more independent
from the underlying OS policies, however more work will be needed to
make that happen and it is not clear that it is worth the effort.

Kohei KaiGai with review by Adam Brightwell and me, commentary by
Stephen, Alvaro, Tom, Robert, and others.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/794e2558be670be65a8fdb52b99438a67cd74631

Modified Files
--
contrib/sepgsql/expected/alter.out |  184 
contrib/sepgsql/expected/ddl.out   |  410 +++-
contrib/sepgsql/expected/dml.out   |6 +-
contrib/sepgsql/expected/label.out |  106 +-
contrib/sepgsql/expected/misc.out  |   34 +--
contrib/sepgsql/launcher   |2 +-
contrib/sepgsql/sepgsql-regtest.te |   59 +-
contrib/sepgsql/sql/alter.sql  |2 +-
contrib/sepgsql/sql/ddl.sql|2 +-
contrib/sepgsql/sql/dml.sql|2 +-
contrib/sepgsql/sql/label.sql  |   20 +-
11 files changed, 449 insertions(+), 378 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix sepgsql regression tests.

2015-08-30 Thread Joe Conway
Fix sepgsql regression tests.

The regression tests for sepgsql were broken by changes in the
base distro as-shipped policies. Specifically, definition of
unconfined_t in the system default policy was changed to bypass
multi-category rules, which the regression test depended on.
Fix that by defining a custom privileged domain
(sepgsql_regtest_superuser_t) and using it instead of system's
unconfined_t domain. The new sepgsql_regtest_superuser_t domain
performs almost like the current unconfined_t, but restricted by
multi-category policy as the traditional unconfined_t was.

The custom policy module is a self defined domain, and so should not
be affected by related future system policy changes. However, it still
uses the unconfined_u:unconfined_r pair for selinux-user and role.
Those definitions have not been changed for several years and seem
less risky to rely on than the unconfined_t domain. Additionally, if
we define custom user/role, they would need to be manually defined
at the operating system level, adding more complexity to an already
non-standard and complex regression test.

Back-patch to 9.3. The regression tests will need more work before
working correctly on 9.2. Starting with 9.2, sepgsql has had dependencies
on libselinux versions that are only available on newer distros with
the changed set of policies (e.g. RHEL 7.x). On 9.1 sepgsql works
fine with the older distros with original policy set (e.g. RHEL 6.x),
and on which the existing regression tests work fine. We might want
eventually change 9.1 sepgsql regression tests to be more independent
from the underlying OS policies, however more work will be needed to
make that happen and it is not clear that it is worth the effort.

Kohei KaiGai with review by Adam Brightwell and me, commentary by
Stephen, Alvaro, Tom, Robert, and others.

Branch
--
REL9_3_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/d66455bc9fff72593353c67c449fe2145dca7f19

Modified Files
--
contrib/sepgsql/expected/alter.out |  178 
contrib/sepgsql/expected/ddl.out   |  394 ++--
contrib/sepgsql/expected/dml.out   |6 +-
contrib/sepgsql/expected/label.out |  106 +-
contrib/sepgsql/expected/misc.out  |   34 ++--
contrib/sepgsql/launcher   |2 +-
contrib/sepgsql/sepgsql-regtest.te |   59 +-
contrib/sepgsql/sql/alter.sql  |2 +-
contrib/sepgsql/sql/ddl.sql|2 +-
contrib/sepgsql/sql/dml.sql|2 +-
contrib/sepgsql/sql/label.sql  |   20 +-
11 files changed, 424 insertions(+), 381 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix sepgsql regression tests.

2015-08-30 Thread Joe Conway
Fix sepgsql regression tests.

The regression tests for sepgsql were broken by changes in the
base distro as-shipped policies. Specifically, definition of
unconfined_t in the system default policy was changed to bypass
multi-category rules, which the regression test depended on.
Fix that by defining a custom privileged domain
(sepgsql_regtest_superuser_t) and using it instead of system's
unconfined_t domain. The new sepgsql_regtest_superuser_t domain
performs almost like the current unconfined_t, but restricted by
multi-category policy as the traditional unconfined_t was.

The custom policy module is a self defined domain, and so should not
be affected by related future system policy changes. However, it still
uses the unconfined_u:unconfined_r pair for selinux-user and role.
Those definitions have not been changed for several years and seem
less risky to rely on than the unconfined_t domain. Additionally, if
we define custom user/role, they would need to be manually defined
at the operating system level, adding more complexity to an already
non-standard and complex regression test.

Back-patch to 9.3. The regression tests will need more work before
working correctly on 9.2. Starting with 9.2, sepgsql has had dependencies
on libselinux versions that are only available on newer distros with
the changed set of policies (e.g. RHEL 7.x). On 9.1 sepgsql works
fine with the older distros with original policy set (e.g. RHEL 6.x),
and on which the existing regression tests work fine. We might want
eventually change 9.1 sepgsql regression tests to be more independent
from the underlying OS policies, however more work will be needed to
make that happen and it is not clear that it is worth the effort.

Kohei KaiGai with review by Adam Brightwell and me, commentary by
Stephen, Alvaro, Tom, Robert, and others.

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/1c419abffba7a105948495f498780f1cf9ab7fc4

Modified Files
--
contrib/sepgsql/expected/alter.out |  184 
contrib/sepgsql/expected/ddl.out   |  410 +++-
contrib/sepgsql/expected/dml.out   |6 +-
contrib/sepgsql/expected/label.out |  106 +-
contrib/sepgsql/expected/misc.out  |   34 +--
contrib/sepgsql/launcher   |2 +-
contrib/sepgsql/sepgsql-regtest.te |   59 +-
contrib/sepgsql/sql/alter.sql  |2 +-
contrib/sepgsql/sql/ddl.sql|2 +-
contrib/sepgsql/sql/dml.sql|2 +-
contrib/sepgsql/sql/label.sql  |   20 +-
11 files changed, 449 insertions(+), 378 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix sepgsql regression tests.

2015-08-30 Thread Joe Conway
Fix sepgsql regression tests.

The regression tests for sepgsql were broken by changes in the
base distro as-shipped policies. Specifically, definition of
unconfined_t in the system default policy was changed to bypass
multi-category rules, which the regression test depended on.
Fix that by defining a custom privileged domain
(sepgsql_regtest_superuser_t) and using it instead of system's
unconfined_t domain. The new sepgsql_regtest_superuser_t domain
performs almost like the current unconfined_t, but restricted by
multi-category policy as the traditional unconfined_t was.

The custom policy module is a self defined domain, and so should not
be affected by related future system policy changes. However, it still
uses the unconfined_u:unconfined_r pair for selinux-user and role.
Those definitions have not been changed for several years and seem
less risky to rely on than the unconfined_t domain. Additionally, if
we define custom user/role, they would need to be manually defined
at the operating system level, adding more complexity to an already
non-standard and complex regression test.

Back-patch to 9.3. The regression tests will need more work before
working correctly on 9.2. Starting with 9.2, sepgsql has had dependencies
on libselinux versions that are only available on newer distros with
the changed set of policies (e.g. RHEL 7.x). On 9.1 sepgsql works
fine with the older distros with original policy set (e.g. RHEL 6.x),
and on which the existing regression tests work fine. We might want
eventually change 9.1 sepgsql regression tests to be more independent
from the underlying OS policies, however more work will be needed to
make that happen and it is not clear that it is worth the effort.

Kohei KaiGai with review by Adam Brightwell and me, commentary by
Stephen, Alvaro, Tom, Robert, and others.

Branch
--
REL9_4_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/12da677179c3febd8d3c829fffa5cd2f922f6286

Modified Files
--
contrib/sepgsql/expected/alter.out |  178 
contrib/sepgsql/expected/ddl.out   |  394 ++--
contrib/sepgsql/expected/dml.out   |6 +-
contrib/sepgsql/expected/label.out |  106 +-
contrib/sepgsql/expected/misc.out  |   34 ++--
contrib/sepgsql/launcher   |2 +-
contrib/sepgsql/sepgsql-regtest.te |   59 +-
contrib/sepgsql/sql/alter.sql  |2 +-
contrib/sepgsql/sql/ddl.sql|2 +-
contrib/sepgsql/sql/dml.sql|2 +-
contrib/sepgsql/sql/label.sql  |   20 +-
11 files changed, 424 insertions(+), 381 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Reestablish alignment of pg_controldata output.

2015-08-25 Thread Joe Conway
Reestablish alignment of pg_controldata output.

Until 9.4, pg_controldata output was all aligned. At some point
during 9.5 development, a new item was added, namely
Current track_commit_timestamp setting: which is two characters
too long to be aligned with the rest of the output. Fix this by
removing the noise word Current and adding the requisite number
of padding spaces. Since the six preceding items are also similar
in nature, remove Current and pad those as well in order to
maintain overall consistency. Backpatch to 9.5 where new offending
item was added.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/56c8ce8f6573d4943a621d09ebb6fe767f16d61e

Modified Files
--
src/bin/pg_controldata/pg_controldata.c |   14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Reestablish alignment of pg_controldata output.

2015-08-25 Thread Joe Conway
Reestablish alignment of pg_controldata output.

Until 9.4, pg_controldata output was all aligned. At some point
during 9.5 development, a new item was added, namely
Current track_commit_timestamp setting: which is two characters
too long to be aligned with the rest of the output. Fix this by
removing the noise word Current and adding the requisite number
of padding spaces. Since the six preceding items are also similar
in nature, remove Current and pad those as well in order to
maintain overall consistency. Backpatch to 9.5 where new offending
item was added.

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/bff62dfb873be1f2469402c6e22cfb93b639f9cd

Modified Files
--
src/bin/pg_controldata/pg_controldata.c |   14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix psql \d output of policies.

2015-08-03 Thread Joe Conway
Fix psql \d output of policies.

psql neglected to wrap parenthesis around USING and WITH CHECK
expressions -- fixed. Back-patched to 9.5 where RLS policies were
introduced.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/c3cc844feb4a52fc57f53d129f33782d55f29340

Modified Files
--
src/bin/psql/describe.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix psql \d output of policies.

2015-08-03 Thread Joe Conway
Fix psql \d output of policies.

psql neglected to wrap parenthesis around USING and WITH CHECK
expressions -- fixed. Back-patched to 9.5 where RLS policies were
introduced.

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/8f45a58d394bbe83c54306ba769ac02c9239c259

Modified Files
--
src/bin/psql/describe.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Use appropriate command type when retrieving relation's policies

2015-07-30 Thread Joe Conway
Use appropriate command type when retrieving relation's policies.

When retrieving policies, if not working on the root target relation,
we actually want the relation's SELECT policies, regardless of
the top level query command type. For example in UPDATE t1...FROM t2
we need to apply t1's UPDATE policies and t2's SELECT policies.
Previously top level query command type was applied to all relations,
which was wrong. Add some regression coverage to ensure we don't
violate this principle in the future.

Report and patch by Dean Rasheed. Cherry picked from larger refactoring
patch and tweaked by me. Back-patched to 9.5 where RLS was introduced.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/1e15b212290bf6daff752f20e9e0356e4dac6e09

Modified Files
--
src/backend/rewrite/rowsecurity.c |   12 -
src/test/regress/expected/rowsecurity.out |   83 +
src/test/regress/sql/rowsecurity.sql  |   40 ++
3 files changed, 134 insertions(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Improve CREATE FUNCTION doc WRT to LEAKPROOF RLS interaction.

2015-07-30 Thread Joe Conway
Improve CREATE FUNCTION doc WRT to LEAKPROOF RLS interaction.

Patch by Dean Rasheed. Back-patched to 9.5 where RLS was introduced.

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/7be60a2459135199f8edff7f553b6d551729d79f

Modified Files
--
doc/src/sgml/ref/create_function.sgml |   15 ---
1 file changed, 12 insertions(+), 3 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Improve CREATE FUNCTION doc WRT to LEAKPROOF RLS interaction.

2015-07-30 Thread Joe Conway
Improve CREATE FUNCTION doc WRT to LEAKPROOF RLS interaction.

Patch by Dean Rasheed. Back-patched to 9.5 where RLS was introduced.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/d6314b20cd872a542d71738df54a906d2962abb8

Modified Files
--
doc/src/sgml/ref/create_function.sgml |   15 ---
1 file changed, 12 insertions(+), 3 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Use appropriate command type when retrieving relation's policies

2015-07-30 Thread Joe Conway
Use appropriate command type when retrieving relation's policies.

When retrieving policies, if not working on the root target relation,
we actually want the relation's SELECT policies, regardless of
the top level query command type. For example in UPDATE t1...FROM t2
we need to apply t1's UPDATE policies and t2's SELECT policies.
Previously top level query command type was applied to all relations,
which was wrong. Add some regression coverage to ensure we don't
violate this principle in the future.

Report and patch by Dean Rasheed. Cherry picked from larger refactoring
patch and tweaked by me. Back-patched to 9.5 where RLS was introduced.

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/23b5e726da6ef5ebbc1dbc821320ee35fa1d0737

Modified Files
--
src/backend/rewrite/rowsecurity.c |   12 -
src/test/regress/expected/rowsecurity.out |   83 +
src/test/regress/sql/rowsecurity.sql  |   40 ++
3 files changed, 134 insertions(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Add missing post create and alter hooks to policy objects.

2015-07-29 Thread Joe Conway
Add missing post create and alter hooks to policy objects.

AlterPolicy() and CreatePolicy() lacked their respective hook invocations.
Noted by Noah Misch, review by Dean Rasheed. Back-patch to 9.5 where
RLS was introduced.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/efe72a82aa5e0d6f907a5d21f1a99b677f44f817

Modified Files
--
src/backend/commands/policy.c |4 
1 file changed, 4 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Add missing post create and alter hooks to policy objects.

2015-07-29 Thread Joe Conway
Add missing post create and alter hooks to policy objects.

AlterPolicy() and CreatePolicy() lacked their respective hook invocations.
Noted by Noah Misch, review by Dean Rasheed. Back-patch to 9.5 where
RLS was introduced.

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/0bfbf14f93c30ec8f505baba79625f5a3b010405

Modified Files
--
src/backend/commands/policy.c |4 
1 file changed, 4 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Create new ParseExprKind for use by policy expressions.

2015-07-29 Thread Joe Conway
Create new ParseExprKind for use by policy expressions.

Policy USING and WITH CHECK expressions were using EXPR_KIND_WHERE for
parse analysis, which results in inappropriate ERROR messages when
the expression contains unsupported constructs such as aggregates.
Create a new ParseExprKind called EXPR_KIND_POLICY and tailor the
related messages to fit.

Reported by Noah Misch. Reviewed by Dean Rasheed, Alvaro Herrera,
and Robert Haas. Back-patch to 9.5 where RLS was introduced.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/632cd9f892119858bc5b617bb60c0377a8a2ed13

Modified Files
--
src/backend/commands/policy.c|8 
src/backend/parser/parse_agg.c   |   10 ++
src/backend/parser/parse_expr.c  |3 +++
src/include/parser/parse_node.h  |3 ++-
src/test/modules/test_rls_hooks/test_rls_hooks.c |4 ++--
src/test/regress/expected/rowsecurity.out|9 +
src/test/regress/sql/rowsecurity.sql |9 +
7 files changed, 39 insertions(+), 7 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Create new ParseExprKind for use by policy expressions.

2015-07-29 Thread Joe Conway
Create new ParseExprKind for use by policy expressions.

Policy USING and WITH CHECK expressions were using EXPR_KIND_WHERE for
parse analysis, which results in inappropriate ERROR messages when
the expression contains unsupported constructs such as aggregates.
Create a new ParseExprKind called EXPR_KIND_POLICY and tailor the
related messages to fit.

Reported by Noah Misch. Reviewed by Dean Rasheed, Alvaro Herrera,
and Robert Haas. Back-patch to 9.5 where RLS was introduced.

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/43797ed42a7c0365c9143ad6efdc566ac9d93fd8

Modified Files
--
src/backend/commands/policy.c|8 
src/backend/parser/parse_agg.c   |   10 ++
src/backend/parser/parse_expr.c  |3 +++
src/include/parser/parse_node.h  |3 ++-
src/test/modules/test_rls_hooks/test_rls_hooks.c |4 ++--
src/test/regress/expected/rowsecurity.out|9 +
src/test/regress/sql/rowsecurity.sql |9 +
7 files changed, 39 insertions(+), 7 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Suppress variable may be used uninitialized warning.

2015-07-28 Thread Joe Conway
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 07/28/2015 05:54 PM, Tom Lane wrote:
 Joe Conway m...@joeconway.com writes:
 Suppress variable may be used uninitialized warning.
 
 That's odd -- I compiled both with and without debug options
 looking for warnings and saw none.
 
 That warning is very compiler-dependent; smarter compilers can
 prove that an uninitialized usage is unreachable while dumber ones
 can't. I saw it on RHEL6's gcc 4.4.7.  I figure that suppressing
 warnings on any reasonably popular/modern compiler is fair game.

Ah, ok. I just felt bad that I didn't find it myself.


- -- 
Joe Conway
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBAgAGBQJVuCjDAAoJEDfy90M199hl+qwP/ipvor/74wQpxdHCge2pepDJ
ZS/sflIP+4VpALaMGGX9MkAo7ZeFMsZ3Yu2VfW7+0wlPUvWt/dydEZZKU5e9ujAR
zEVmAfWwYimeUsWs/6i6R/P6jKkT0JnThIMgLXEJIEr/xCqiUjyCy5X1wTVaRAvd
USMPpHra4mc3X1KQrT3AMwHj3ZZA1ygul5unarQ5PoZWPwPPkHX7Hg/5q99fYynO
U7XBL5+O1HWDoGsXVPIK4oqB1L+kt7QyPyalIHf/lYO/iS+KsbIZvYLcn9JbddWK
mei56EOxRgqhwalI6HccoHHx0arjUgC3D9OFtDWkAaHsL7qMpdjhxU9Sp0E7S7Vj
IjrdE61zREw9R7fZeT4I54SKqok2VJCu1739ntnzc2tw1z+jTj/LD57sc2IbxjSI
zI5Rj1FgP3zcc73gq2eu8HzeMRkCig0AvdjI3llGTVIy4x4WDx5GncLLhCiaJ8OP
vMkNpZtHOzJuvrBNfDkZ7inO3E54uyPTt++ON5TX0YVUrG4cQnOds1g85R1QUTBj
E6YRIpeMBWqi0ErtTGN4R2BdepV/tMxVA4p9a2wIFOxxV83bIDlZsILKyVtMsZBV
SEDMbKDoT8t8/6YZ22eKmF5nORTXCY14vCOltaDQ9RnHRBYLv8dMZg9BqHnDDGeg
sRTSPf+j4r7wGOtCJEsx
=krPc
-END PGP SIGNATURE-


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Prevent platform-dependent output row ordering in a new test que

2015-07-28 Thread Joe Conway
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 07/28/2015 05:00 PM, Tom Lane wrote:
 Prevent platform-dependent output row ordering in a new test
 query.
 
 Buildfarm indicates this is necessary.

Yet another important safety tip -- thanks for fixing!

- -- 
Joe Conway
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBAgAGBQJVuByqAAoJEDfy90M199hl9H8P+QF5R1MyPUTD2VDX/5nZ7hdA
bUcrXrtAoSZCHXyX3oozncTB6H3X2HbEc23DK8jmPLj3aZJzH1b4G42iqLfjvcvk
KrqxZVby95JqUxNyI/yaeSJbvXCiZhHRgNflcLHnms7ctPAKTCAAh0ptlM9YUTQF
sRw+MdVdCsPNaVZR/8GjwX3FApctneHjUUItxiHQvHDAx2Ssq5koXeg8CR7yq51z
f+osBWYczQafEzm93fBhcSHqJqsG36hG7PynBEY2HL7Ig813tSACxfvVZc4jp/84
9qJapQDv3M4kPpKOYrpEL8eJs1tNO9Kc3NKf2Tt/rGUaay6JZiXBXhkZv2fraVbY
IOunHtAAw1BdJwnIP4PtTRD2ZwbvW2YnZz57mPs06vrAZ5K/OQHw6KNAc+inuC/u
Px+W61Fqgn0tSd8DTYvUnwgpajdSMT0ta3X+k+mNZAXB/bWd+8ahEdVYbKJAH0lz
EKz80CHDVJCCVQZLe5OmPb5nVNmjPoWUAgZePIGN2Wnuo304VIr0YxNbfiBIytP7
cTLZ2YE1FxJR8pNLyYsmNckZnZqtq08m9EiTrh+Es6DPJsGzlLoszOKhkdzRI+Tf
DtZjW+7loLauyTpPZIEFrvm+VQZsuoYpi3uvhgQgEcvwNKl97KmPcGZdVuSpzosW
suvCK6RtTXqUSDOPGEDB
=1os5
-END PGP SIGNATURE-


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Create a pg_shdepend entry for each role in TO clause of policie

2015-07-28 Thread Joe Conway
Create a pg_shdepend entry for each role in TO clause of policies.

CreatePolicy() and AlterPolicy() omit to create a pg_shdepend entry for
each role in the TO clause. Fix this by creating a new shared dependency
type called SHARED_DEPENDENCY_POLICY and assigning it to each role.

Reported by Noah Misch. Patch by me, reviewed by Alvaro Herrera.
Back-patch to 9.5 where RLS was introduced.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/f781a0f1d88411978c9df5f05cbb4f46aabe3d24

Modified Files
--
doc/src/sgml/catalogs.sgml|   10 
src/backend/catalog/pg_shdepend.c |2 +
src/backend/commands/policy.c |   87 -
src/include/catalog/dependency.h  |5 ++
src/test/regress/expected/rowsecurity.out |   55 ++
src/test/regress/sql/rowsecurity.sql  |   44 +++
6 files changed, 177 insertions(+), 26 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Create a pg_shdepend entry for each role in TO clause of policie

2015-07-28 Thread Joe Conway
Create a pg_shdepend entry for each role in TO clause of policies.

CreatePolicy() and AlterPolicy() omit to create a pg_shdepend entry for
each role in the TO clause. Fix this by creating a new shared dependency
type called SHARED_DEPENDENCY_POLICY and assigning it to each role.

Reported by Noah Misch. Patch by me, reviewed by Alvaro Herrera.
Back-patch to 9.5 where RLS was introduced.

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/992c9d345f6607c5b2cab2787f7cf72fba96673d

Modified Files
--
doc/src/sgml/catalogs.sgml|   10 
src/backend/catalog/pg_shdepend.c |2 +
src/backend/commands/policy.c |   87 -
src/include/catalog/dependency.h  |5 ++
src/test/regress/expected/rowsecurity.out |   55 ++
src/test/regress/sql/rowsecurity.sql  |   44 +++
6 files changed, 177 insertions(+), 26 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Plug RLS related information leak in pg_stats view.

2015-07-28 Thread Joe Conway
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 07/28/2015 01:56 PM, Tom Lane wrote:
 Joe Conway m...@joeconway.com writes:
 Plug RLS related information leak in pg_stats view.
 
 BTW, a note about this: I see you bumped catversion in both
 branches, which is good, but you bumped it to the same thing, which
 I think is bad.  Two branches with different initial catalog
 contents should not have identical catversions; that more or less
 defeats the point of having the version number.
 
 What I've done in such cases is to assign mmdd1 to the back 
 branch and mmdd2 to HEAD.

Ok -- good point. I'll bump HEAD


- -- 
Joe Conway
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBAgAGBQJVt+zfAAoJEDfy90M199hl5t4P/36ZHW4MMzwXVWU6SgrKDrI9
+6PTpKdigH85OvpMYoiiU5bITz6E2hHAVGkqHbCLwacQiEiZzRPEV3RSAXCCq5Gn
9ARHurQyb89N8wS3f030gRtXEDbY+f8aUpB9DlZuzUPqD2D1XsIgYKm1jTVFRcT/
7/iXiLQ5lLYNgOcrZVS89THOjcm+IdwGoSm16J6Kd8cte9qmhbeJuLn7poQGXl9D
TwMX6UVWqxufFWD6IGodbpnOw3frYrGTIKSbLMTnj4YaY0hs284xa8ogIGZ4+Tze
FSCDkyh8u5g0VD1uS7ose4hI18VOiO+KNUvzONg/rtuYymR96jCKK49FgjQfE3ud
zsOdsicr8Lx3Z14mWFNJmLtqvtiJ2Px9tCxVuxXb1JNI+kuwJoyBrVh0eNjEeJuS
S38H5OVieYGkhTG6ZFm3aGDUkMY3OWgpwPyncWq0mN0eyYReEBRGn3BD48G7mg2Z
BqhoDMeLvOP0qwwYUDutJk3Y2dPvah8VUQFMjqpWnQEcm7M0FCagkMC6pDKUppFL
Z8L3JmRNLdiF2cxCNc3EyELvWjDhr24mlhT2pjZQKWLlUiMJh0w3omfdwQB0g4qo
g2Yr/BG2D3rgzDiQLmR3DkNyP7Wy9PgQhUmWAnjzqHgfnsclWMQS1blIZhfyeIUk
Mm3RnJ2nTES55pP4KDOi
=4Okg
-END PGP SIGNATURE-


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Bump catversion so that HEAD is beyond 9.5

2015-07-28 Thread Joe Conway
Bump catversion so that HEAD is beyond 9.5

As pointed out by Tom, since HEAD has progressed beyond 9.5 in terms of
its catalog, we need to be sure catversion of HEAD is advanced beyond
that of 9.5. Corrects my mistake in the pg_stats view commit cfa928ff.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/1e2bd43b31cdb6d0425430f1568814bce588d8fd

Modified Files
--
src/include/catalog/catversion.h |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Disallow converting a table to a view if row security is present

2015-07-28 Thread Joe Conway
Disallow converting a table to a view if row security is present.

When DefineQueryRewrite() is about to convert a table to a view, it checks
the table for features unavailable to views.  For example, it rejects tables
having triggers.  It omits to reject tables having relrowsecurity or a
pg_policy record. Fix that. To faciliate the repair, invent
relation_has_policies() which indicates the presence of policies on a
relation even when row security is disabled for that relation.

Reported by Noah Misch. Patch by me, review by Stephen Frost. Back-patch
to 9.5 where RLS was introduced.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/d824e2800f66f6180189d973c720611855c6f619

Modified Files
--
src/backend/commands/policy.c |   29 +
src/backend/rewrite/rewriteDefine.c   |   24 +++-
src/include/commands/policy.h |1 +
src/test/regress/expected/rowsecurity.out |   23 +++
src/test/regress/sql/rowsecurity.sql  |   25 +
5 files changed, 97 insertions(+), 5 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Disallow converting a table to a view if row security is present

2015-07-28 Thread Joe Conway
Disallow converting a table to a view if row security is present.

When DefineQueryRewrite() is about to convert a table to a view, it checks
the table for features unavailable to views.  For example, it rejects tables
having triggers.  It omits to reject tables having relrowsecurity or a
pg_policy record. Fix that. To faciliate the repair, invent
relation_has_policies() which indicates the presence of policies on a
relation even when row security is disabled for that relation.

Reported by Noah Misch. Patch by me, review by Stephen Frost. Back-patch
to 9.5 where RLS was introduced.

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/344703bcc453ac3ce0060785d4958ddec7d2dbe9

Modified Files
--
src/backend/commands/policy.c |   29 +
src/backend/rewrite/rewriteDefine.c   |   24 +++-
src/include/commands/policy.h |1 +
src/test/regress/expected/rowsecurity.out |   23 +++
src/test/regress/sql/rowsecurity.sql  |   25 +
5 files changed, 97 insertions(+), 5 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Plug RLS related information leak in pg_stats view.

2015-07-28 Thread Joe Conway
Plug RLS related information leak in pg_stats view.

The pg_stats view is supposed to be restricted to only show rows
about tables the user can read. However, it sometimes can leak
information which could not otherwise be seen when row level security
is enabled. Fix that by not showing pg_stats rows to users that would
be subject to RLS on the table the row is related to. This is done
by creating/using the newly introduced SQL visible function,
row_security_active().

Along the way, clean up three call sites of check_enable_rls(). The second
argument of that function should only be specified as other than
InvalidOid when we are checking as a different user than the current one,
as in when querying through a view. These sites were passing GetUserId()
instead of InvalidOid, which can cause the function to return incorrect
results if the current user has the BYPASSRLS privilege and row_security
has been set to OFF.

Additionally fix a bug causing RI Trigger error messages to unintentionally
leak information when RLS is enabled, and other minor cleanup and
improvements. Also add WITH (security_barrier) to the definition of pg_stats.

Bumped CATVERSION due to new SQL functions and pg_stats view definition.

Back-patch to 9.5 where RLS was introduced. Reported by Yaroslav.
Patch by Joe Conway and Dean Rasheed with review and input by
Michael Paquier and Stephen Frost.

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/cfa928ff6f944ac101802718f64db942060187b1

Modified Files
--
doc/src/sgml/func.sgml|   16 +
src/backend/access/index/genam.c  |2 +-
src/backend/catalog/system_views.sql  |6 ++--
src/backend/executor/execMain.c   |2 +-
src/backend/rewrite/rowsecurity.c |   16 ++---
src/backend/utils/adt/ri_triggers.c   |4 ++-
src/backend/utils/cache/plancache.c   |7 +---
src/backend/utils/init/miscinit.c |   14 +++-
src/backend/utils/misc/rls.c  |   53 -
src/include/catalog/catversion.h  |2 +-
src/include/catalog/pg_proc.h |6 
src/include/miscadmin.h   |1 +
src/include/utils/builtins.h  |4 +++
src/test/regress/expected/rowsecurity.out |   38 +++--
src/test/regress/expected/rules.out   |2 +-
src/test/regress/sql/rowsecurity.sql  |   17 -
16 files changed, 159 insertions(+), 31 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Plug RLS related information leak in pg_stats view.

2015-07-28 Thread Joe Conway
Plug RLS related information leak in pg_stats view.

The pg_stats view is supposed to be restricted to only show rows
about tables the user can read. However, it sometimes can leak
information which could not otherwise be seen when row level security
is enabled. Fix that by not showing pg_stats rows to users that would
be subject to RLS on the table the row is related to. This is done
by creating/using the newly introduced SQL visible function,
row_security_active().

Along the way, clean up three call sites of check_enable_rls(). The second
argument of that function should only be specified as other than
InvalidOid when we are checking as a different user than the current one,
as in when querying through a view. These sites were passing GetUserId()
instead of InvalidOid, which can cause the function to return incorrect
results if the current user has the BYPASSRLS privilege and row_security
has been set to OFF.

Additionally fix a bug causing RI Trigger error messages to unintentionally
leak information when RLS is enabled, and other minor cleanup and
improvements. Also add WITH (security_barrier) to the definition of pg_stats.

Bumped CATVERSION due to new SQL functions and pg_stats view definition.

Back-patch to 9.5 where RLS was introduced. Reported by Yaroslav.
Patch by Joe Conway and Dean Rasheed with review and input by
Michael Paquier and Stephen Frost.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/7b4bfc87d5e73c94ae1591c482f626a011498915

Modified Files
--
doc/src/sgml/func.sgml|   16 +
src/backend/access/index/genam.c  |2 +-
src/backend/catalog/system_views.sql  |6 ++--
src/backend/executor/execMain.c   |2 +-
src/backend/rewrite/rowsecurity.c |   16 ++---
src/backend/utils/adt/ri_triggers.c   |4 ++-
src/backend/utils/cache/plancache.c   |7 +---
src/backend/utils/init/miscinit.c |   14 +++-
src/backend/utils/misc/rls.c  |   53 -
src/include/catalog/catversion.h  |2 +-
src/include/catalog/pg_proc.h |6 
src/include/miscadmin.h   |1 +
src/include/utils/builtins.h  |4 +++
src/test/regress/expected/rowsecurity.out |   38 +++--
src/test/regress/expected/rules.out   |2 +-
src/test/regress/sql/rowsecurity.sql  |   17 -
16 files changed, 159 insertions(+), 31 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix pg_dump output of policies.

2015-07-27 Thread Joe Conway
Fix pg_dump output of policies.

pg_dump neglected to wrap parenthesis around USING and WITH CHECK
expressions -- fixed. Reported by Noah Misch.

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/510aad31eaf2129d28ae3dbfc58f98775192ee94

Modified Files
--
src/bin/pg_dump/pg_dump.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Fix pg_dump output of policies.

2015-07-27 Thread Joe Conway
Fix pg_dump output of policies.

pg_dump neglected to wrap parenthesis around USING and WITH CHECK
expressions -- fixed. Reported by Noah Misch.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/e0d4a290f4a24b0a0a46af4d0f8551f8ee5e5513

Modified Files
--
src/bin/pg_dump/pg_dump.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Improve markup for row_security.

2015-07-25 Thread Joe Conway
Improve markup for row_security.

Wrap the literals on, off, force, and BYPASSRLS with appropriate
markup. Per Kevin Grittner.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/cf80ddee57103bb3b454c1607d100a4551d7a48c

Modified Files
--
doc/src/sgml/config.sgml |   22 --
1 file changed, 12 insertions(+), 10 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Improve markup for row_security.

2015-07-25 Thread Joe Conway
Improve markup for row_security.

Wrap the literals on, off, force, and BYPASSRLS with appropriate
markup. Per Kevin Grittner.

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/60624f45fc12a249fd48ac7557238c974d8e5011

Modified Files
--
doc/src/sgml/config.sgml |   22 --
1 file changed, 12 insertions(+), 10 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Make RLS work with UPDATE ... WHERE CURRENT OF

2015-07-24 Thread Joe Conway
Make RLS work with UPDATE ... WHERE CURRENT OF

UPDATE ... WHERE CURRENT OF would not work in conjunction with
RLS. Arrange to allow the CURRENT OF expression to be pushed down.
Issue noted by Peter Geoghegan. Patch by Dean Rasheed. Back patch
to 9.5 where RLS was introduced.

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/7d4240d6cd91d83d263a45501cc2f44fb1d0a537

Modified Files
--
src/backend/optimizer/path/allpaths.c |   40 +++
src/backend/optimizer/util/clauses.c  |   10 +++
src/test/regress/expected/rowsecurity.out |  107 +
src/test/regress/sql/rowsecurity.sql  |   49 +
4 files changed, 206 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Make RLS work with UPDATE ... WHERE CURRENT OF

2015-07-24 Thread Joe Conway
Make RLS work with UPDATE ... WHERE CURRENT OF

UPDATE ... WHERE CURRENT OF would not work in conjunction with
RLS. Arrange to allow the CURRENT OF expression to be pushed down.
Issue noted by Peter Geoghegan. Patch by Dean Rasheed. Back patch
to 9.5 where RLS was introduced.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/b26e3d660df51a088d14c3c2cfce5990c13c1195

Modified Files
--
src/backend/optimizer/path/allpaths.c |   40 +++
src/backend/optimizer/util/clauses.c  |   10 +++
src/test/regress/expected/rowsecurity.out |  107 +
src/test/regress/sql/rowsecurity.sql  |   49 +
4 files changed, 206 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Add assign_expr_collations() to CreatePolicy() and AlterPolicy()

2015-07-12 Thread Joe Conway
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 07/11/2015 08:35 PM, Tom Lane wrote:
 Bruce Momjian br...@momjian.us writes:
 On Sat, Jul 11, 2015 at 09:20:41PM +, Joe Conway wrote:
 Add assign_expr_collations() to CreatePolicy() and
 AlterPolicy().
 
 I think this commit has added a compiler warning: policy.c:542:
 warning: implicit declaration of function
 'assign_expr_collations'

Mea culpa.

 Indeed ... fixed.

Thanks for that. Will be sure to do better next time.

Joe

-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQIcBAEBAgAGBQJVom6gAAoJEDfy90M199hlm4sP/3dhY2D1I9nluP93D3ikAZfG
FXA8/KlCF9igU43Yp3CnwMInZ+SpvMbaat5+inCe/l5fjhak/DcYCtCfrYqqeCBS
mJi1h0dRQYsQkzZwd2NeEJHVna2Olg63McRBDEqLoan99zgfqrwNcAqeiImRUZ5U
jv+YVOo8U3mTIay2w7MwhDKofKANMU9hP6mOzkCCNJtt7YXkfTa+AFSfrzjrUl24
RTq97uiaHRraNumOa0ywbLsi+rGi41BjHhS8mxgX3e1wZMsZoKNnJduJc2TF3vAn
a5mHQ+IO81vp3rB98o3A7JzVf9jP2knTwo2BYppwufyZqx2uYFnoAJKgVaS9M/Vj
Wb51p5afbs/hBy2Xt0nRELUSyxk8woOsw4CaLYT78WwM3f/rg8q4Mtd9wzV8QeOf
V4KWNmKZmFp/5i59ohrjzHcQZ52jo9I84pi115Wy0eipqynnZwbYcbmVo44NRQ3e
jz18vIgJfmI48qbOh2oNVrVnqg9sCGvtPb9DmP8FVE86nei+D2kb/ew2KlqRVm83
gWDORC39IwGVfzx9ZIJDU/j0l7PRKaS9Sf7RQutcth9Cxt43BaXhYVv5m4RBhCcU
z1ZZTOoAZ6QKrQb2O5qD5lI4zbGJ5W0YK1NC3GlApMYAhTrjcWDewEiUegQUrzD5
22lVxBYBl59o0Roi4Mmn
=hjZj
-END PGP SIGNATURE-


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Add assign_expr_collations() to CreatePolicy() and AlterPolicy()

2015-07-11 Thread Joe Conway
Add assign_expr_collations() to CreatePolicy() and AlterPolicy().

As noted by Noah Misch, CreatePolicy() and AlterPolicy() omit to call
assign_expr_collations() on the node trees. Fix the omission and add
his test case to the rowsecurity regression test.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/808ea8fc7bb259ddd810353719cac66e85a608c8

Modified Files
--
src/backend/commands/policy.c |   10 ++
src/test/regress/expected/rowsecurity.out |   21 +
src/test/regress/sql/rowsecurity.sql  |   12 
3 files changed, 43 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Add assign_expr_collations() to CreatePolicy() and AlterPolicy()

2015-07-11 Thread Joe Conway
Add assign_expr_collations() to CreatePolicy() and AlterPolicy().

As noted by Noah Misch, CreatePolicy() and AlterPolicy() omit to call
assign_expr_collations() on the node trees. Fix the omission and add
his test case to the rowsecurity regression test.

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/7236f5b068ca78bb3e771f62ee1365ba945d4869

Modified Files
--
src/backend/commands/policy.c |   10 ++
src/test/regress/expected/rowsecurity.out |   21 +
src/test/regress/sql/rowsecurity.sql  |   12 
3 files changed, 43 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Improve regression test coverage of table lock modes vs permissi

2015-07-07 Thread Joe Conway
Improve regression test coverage of table lock modes vs permissions.

Test the interactions with permissions and LOCK TABLE. Specifically
ROW EXCLUSIVE, ACCESS SHARE, and ACCESS EXCLUSIVE modes against
SELECT, INSERT, UPDATE, DELETE, and TRUNCATE permissions. Discussed
by Stephen Frost and Michael Paquier, patch by the latter. Backpatch
to 9.5 where matching behavior was first committed.

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/d5f551abcf78cb4e3f6c5d195bd260893443414b

Modified Files
--
src/test/regress/expected/privileges.out |   83 +
src/test/regress/sql/privileges.sql  |   84 ++
2 files changed, 167 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Improve regression test coverage of table lock modes vs permissi

2015-07-07 Thread Joe Conway
Improve regression test coverage of table lock modes vs permissions.

Test the interactions with permissions and LOCK TABLE. Specifically
ROW EXCLUSIVE, ACCESS SHARE, and ACCESS EXCLUSIVE modes against
SELECT, INSERT, UPDATE, DELETE, and TRUNCATE permissions. Discussed
by Stephen Frost and Michael Paquier, patch by the latter. Backpatch
to 9.5 where matching behavior was first committed.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/e66a45344ff33d64aa6ff50673ff9fe8577ea6db

Modified Files
--
src/test/regress/expected/privileges.out |   83 +
src/test/regress/sql/privileges.sql  |   84 ++
2 files changed, 167 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Make RLS related error messages more consistent and compliant.

2015-07-06 Thread Joe Conway
Make RLS related error messages more consistent and compliant.

Also updated regression expected output to match. Noted and patch by Daniele 
Varrazzo.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/02eac01f91923592f93abf8d325ab806b058f948

Modified Files
--
src/backend/commands/policy.c |6 +++---
src/backend/commands/user.c   |2 +-
src/test/regress/expected/rowsecurity.out |2 +-
3 files changed, 5 insertions(+), 5 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Make RLS related error messages more consistent and compliant.

2015-07-06 Thread Joe Conway
Make RLS related error messages more consistent and compliant.

Also updated regression expected output to match. Noted and patch by Daniele 
Varrazzo.

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/2867f26fecafc6d9930eb751abdd7b80359a6f51

Modified Files
--
src/backend/commands/policy.c |6 +++---
src/backend/commands/user.c   |2 +-
src/test/regress/expected/rowsecurity.out |2 +-
3 files changed, 5 insertions(+), 5 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Whitespace fix - replace tab with spaces in CREATE TABLE command

2015-07-02 Thread Joe Conway
Whitespace fix - replace tab with spaces in CREATE TABLE command.

Branch
--
REL9_5_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/cf2b5f9b33fda1cbeb8efdfd3989b5e88af74167

Modified Files
--
src/test/regress/expected/rowsecurity.out |2 +-
src/test/regress/sql/rowsecurity.sql  |2 +-
2 files changed, 2 insertions(+), 2 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Whitespace fix - replace tab with spaces in CREATE TABLE command

2015-07-02 Thread Joe Conway
Whitespace fix - replace tab with spaces in CREATE TABLE command.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/1fd0d5ec0373666fe00db4f641490d9e82f53e01

Modified Files
--
src/test/regress/expected/rowsecurity.out |2 +-
src/test/regress/sql/rowsecurity.sql  |2 +-
2 files changed, 2 insertions(+), 2 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Clean up data conversion short-lived memory context.

2014-06-20 Thread Joe Conway
Clean up data conversion short-lived memory context.

dblink uses a short-lived data conversion memory context. However it
was not deleted when no longer needed, leading to a noticeable memory
leak under some circumstances. Plug the hole, along with minor
refactoring. Backpatch to 9.2 where the leak was introduced.

Report and initial patch by MauMau. Reviewed/modified slightly by
Tom Lane and me.

Branch
--
master

Details
---
http://git.postgresql.org/pg/commitdiff/1dde5782e34a1c5ef2ce9d97cf18007fed5fde92

Modified Files
--
contrib/dblink/dblink.c |   22 +-
1 file changed, 13 insertions(+), 9 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Clean up data conversion short-lived memory context.

2014-06-20 Thread Joe Conway
Clean up data conversion short-lived memory context.

dblink uses a short-lived data conversion memory context. However it
was not deleted when no longer needed, leading to a noticeable memory
leak under some circumstances. Plug the hole, along with minor
refactoring. Backpatch to 9.2 where the leak was introduced.

Report and initial patch by MauMau. Reviewed/modified slightly by
Tom Lane and me.

Branch
--
REL9_4_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/9d884a34c343641f7ab3c24377d7ec0970df4eea

Modified Files
--
contrib/dblink/dblink.c |   22 +-
1 file changed, 13 insertions(+), 9 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


[COMMITTERS] pgsql: Clean up data conversion short-lived memory context.

2014-06-20 Thread Joe Conway
Clean up data conversion short-lived memory context.

dblink uses a short-lived data conversion memory context. However it
was not deleted when no longer needed, leading to a noticeable memory
leak under some circumstances. Plug the hole, along with minor
refactoring. Backpatch to 9.2 where the leak was introduced.

Report and initial patch by MauMau. Reviewed/modified slightly by
Tom Lane and me.

Branch
--
REL9_3_STABLE

Details
---
http://git.postgresql.org/pg/commitdiff/b3a3f3d2f437922258371aee78c587b3f774b992

Modified Files
--
contrib/dblink/dblink.c |   22 +-
1 file changed, 13 insertions(+), 9 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


  1   2   3   >