Re: [COMMITTERS] pgsql: Improve performance of timezone loading, especially pg_timezone_

2017-05-06 Thread Tom Lane
Amit Kapila  writes:
> On Wed, May 3, 2017 at 7:21 AM, Tom Lane  wrote:
>> Improve performance of timezone loading, especially pg_timezone_names view.

> I am consistently getting below error after this commit in my Win7 machine:
> running bootstrap script ... 2017-05-07 05:09:13.383 GMT [7908] LOG:
> could not open directory "/installation/share/timezone/posixrules": No
> such file or directory

> This occurs both during initdb and server start.

You sure it wasn't there before, too?  That commit did not add any
file reads that didn't happen before.

regards, tom lane


-- 
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: Improve performance of timezone loading, especially pg_timezone_

2017-05-06 Thread Amit Kapila
On Wed, May 3, 2017 at 7:21 AM, Tom Lane  wrote:
> Improve performance of timezone loading, especially pg_timezone_names view.
>

I am consistently getting below error after this commit in my Win7 machine:
running bootstrap script ... 2017-05-07 05:09:13.383 GMT [7908] LOG:
could not open directory "/installation/share/timezone/posixrules": No
such file or directory

This occurs both during initdb and server start.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com


-- 
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: doc PG 10: adjustments to BRIN, WAL, JSON, XML items, syntax

2017-05-06 Thread Bruce Momjian
doc PG 10:  adjustments to BRIN, WAL, JSON, XML items, syntax

Reported-by: Alvaro Herrera

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/628462bda908873688ce738a191b470ab769d604

Modified Files
--
doc/src/sgml/release-10.sgml | 145 +++
1 file changed, 64 insertions(+), 81 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: pg_dump: Don't leak memory in buildDefaultACLCommands()

2017-05-06 Thread Stephen Frost
pg_dump: Don't leak memory in buildDefaultACLCommands()

buildDefaultACLCommands() didn't destroy the string buffer created in
certain cases, leading to a memory leak.  Fix by destroying the buffer
before returning from the function.

Spotted by Coverity.

Author: Michael Paquier

Back-patch to 9.6 where buildDefaultACLCommands() was added.

Branch
--
REL9_6_STABLE

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

Modified Files
--
src/bin/pg_dump/dumputils.c | 6 ++
1 file changed, 6 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: pg_dump: Don't leak memory in buildDefaultACLCommands()

2017-05-06 Thread Stephen Frost
pg_dump: Don't leak memory in buildDefaultACLCommands()

buildDefaultACLCommands() didn't destroy the string buffer created in
certain cases, leading to a memory leak.  Fix by destroying the buffer
before returning from the function.

Spotted by Coverity.

Author: Michael Paquier

Back-patch to 9.6 where buildDefaultACLCommands() was added.

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/09f842181943b6e83b0779f2e872ff0180b66883

Modified Files
--
src/bin/pg_dump/dumputils.c | 6 ++
1 file changed, 6 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: Allow queries submitted by postgres_fdw to be canceled.

2017-05-06 Thread Robert Haas
Allow queries submitted by postgres_fdw to be canceled.

Back-patch of commits f039eaac7131ef2a4cf63a10cf98486f8bcd09d2 and
1b812afb0eafe125b820cc3b95e7ca03821aa675, which arranged (in 9.6+) to
make remote queries interruptible.  It was known at the time that the
same problem existed in the back-branches, but I did not back-patch
for lack of a user complaint.

Michael Paquier and Etsuro Fujita, adjusted for older branches by me.
Per gripe from Suraj Kharage.  This doesn't directly addresss Suraj's
gripe, but since the patch that will do so builds up on top of this
work, it seems best to back-patch this part first.

Discussion: 
http://postgr.es/m/caf1dzpu8kx+fmxebfop289xtm3bz3t+zfxhmkavr98bh-c0...@mail.gmail.com

Branch
--
REL9_4_STABLE

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

Modified Files
--
contrib/postgres_fdw/connection.c   | 122 
contrib/postgres_fdw/postgres_fdw.c | 109 
contrib/postgres_fdw/postgres_fdw.h |   2 +
3 files changed, 193 insertions(+), 40 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: Allow queries submitted by postgres_fdw to be canceled.

2017-05-06 Thread Robert Haas
Allow queries submitted by postgres_fdw to be canceled.

Back-patch of commits f039eaac7131ef2a4cf63a10cf98486f8bcd09d2 and
1b812afb0eafe125b820cc3b95e7ca03821aa675, which arranged (in 9.6+) to
make remote queries interruptible.  It was known at the time that the
same problem existed in the back-branches, but I did not back-patch
for lack of a user complaint.

Michael Paquier and Etsuro Fujita, adjusted for older branches by me.
Per gripe from Suraj Kharage.  This doesn't directly addresss Suraj's
gripe, but since the patch that will do so builds up on top of this
work, it seems best to back-patch this part first.

Discussion: 
http://postgr.es/m/caf1dzpu8kx+fmxebfop289xtm3bz3t+zfxhmkavr98bh-c0...@mail.gmail.com

Branch
--
REL9_5_STABLE

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

Modified Files
--
contrib/postgres_fdw/connection.c   | 121 
contrib/postgres_fdw/postgres_fdw.c | 113 -
contrib/postgres_fdw/postgres_fdw.h |   2 +
3 files changed, 194 insertions(+), 42 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: Allow queries submitted by postgres_fdw to be canceled.

2017-05-06 Thread Robert Haas
Allow queries submitted by postgres_fdw to be canceled.

Back-patch of commits f039eaac7131ef2a4cf63a10cf98486f8bcd09d2 and
1b812afb0eafe125b820cc3b95e7ca03821aa675, which arranged (in 9.6+) to
make remote queries interruptible.  It was known at the time that the
same problem existed in the back-branches, but I did not back-patch
for lack of a user complaint.

Michael Paquier and Etsuro Fujita, adjusted for older branches by me.
Per gripe from Suraj Kharage.  This doesn't directly addresss Suraj's
gripe, but since the patch that will do so builds up on top of this
work, it seems best to back-patch this part first.

Discussion: 
http://postgr.es/m/caf1dzpu8kx+fmxebfop289xtm3bz3t+zfxhmkavr98bh-c0...@mail.gmail.com

Branch
--
REL9_3_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/3aa16b117a28d70790ce492435d1dfc323edb547

Modified Files
--
contrib/postgres_fdw/connection.c   | 122 
contrib/postgres_fdw/postgres_fdw.c | 109 
contrib/postgres_fdw/postgres_fdw.h |   2 +
3 files changed, 193 insertions(+), 40 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: RLS: Fix ALL vs. SELECT+UPDATE policy usage

2017-05-06 Thread Stephen Frost
RLS: Fix ALL vs. SELECT+UPDATE policy usage

When we add the SELECT-privilege based policies to the RLS with check
options (such as for an UPDATE statement, or when we have INSERT ...
RETURNING), we need to be sure and use the 'USING' case if the policy is
actually an 'ALL' policy (which could have both a USING clause and an
independent WITH CHECK clause).

This could result in policies acting differently when built using ALL
(when the ALL had both USING and WITH CHECK clauses) and when building
the policies independently as SELECT and UPDATE policies.

Fix this by adding an explicit boolean to add_with_check_options() to
indicate when the USING policy should be used, even if the policy has
both USING and WITH CHECK policies on it.

Reported by: Rod Taylor

Back-patch to 9.5 where RLS was introduced.

Branch
--
REL9_6_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/92b15224b4eac8eeae0616491ccf0c852fa2dff9

Modified Files
--
src/backend/rewrite/rowsecurity.c | 23 +++
1 file changed, 15 insertions(+), 8 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: RLS: Fix ALL vs. SELECT+UPDATE policy usage

2017-05-06 Thread Stephen Frost
RLS: Fix ALL vs. SELECT+UPDATE policy usage

When we add the SELECT-privilege based policies to the RLS with check
options (such as for an UPDATE statement, or when we have INSERT ...
RETURNING), we need to be sure and use the 'USING' case if the policy is
actually an 'ALL' policy (which could have both a USING clause and an
independent WITH CHECK clause).

This could result in policies acting differently when built using ALL
(when the ALL had both USING and WITH CHECK clauses) and when building
the policies independently as SELECT and UPDATE policies.

Fix this by adding an explicit boolean to add_with_check_options() to
indicate when the USING policy should be used, even if the policy has
both USING and WITH CHECK policies on it.

Reported by: Rod Taylor

Back-patch to 9.5 where RLS was introduced.

Branch
--
master

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

Modified Files
--
src/backend/rewrite/rowsecurity.c | 23 +++
1 file changed, 15 insertions(+), 8 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: RLS: Fix ALL vs. SELECT+UPDATE policy usage

2017-05-06 Thread Stephen Frost
RLS: Fix ALL vs. SELECT+UPDATE policy usage

When we add the SELECT-privilege based policies to the RLS with check
options (such as for an UPDATE statement, or when we have INSERT ...
RETURNING), we need to be sure and use the 'USING' case if the policy is
actually an 'ALL' policy (which could have both a USING clause and an
independent WITH CHECK clause).

This could result in policies acting differently when built using ALL
(when the ALL had both USING and WITH CHECK clauses) and when building
the policies independently as SELECT and UPDATE policies.

Fix this by adding an explicit boolean to add_with_check_options() to
indicate when the USING policy should be used, even if the policy has
both USING and WITH CHECK policies on it.

Reported by: Rod Taylor

Back-patch to 9.5 where RLS was introduced.

Branch
--
REL9_5_STABLE

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

Modified Files
--
src/backend/rewrite/rowsecurity.c | 23 +++
1 file changed, 15 insertions(+), 8 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 duplicated words in comment.

2017-05-06 Thread Andres Freund
Fix duplicated words in comment.

Reported-By: Peter Geoghegan
Discussion: 
https://postgr.es/m/cah2-wzn3ry2n0gtwndaapd113t+o8l6oz8cm7_f3p8y4awd...@mail.gmail.com
Backpatch: no, only present in master

Branch
--
master

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

Modified Files
--
src/backend/utils/sort/tuplesort.c | 6 +++---
1 file changed, 3 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: Fix off-by-one possibly leading to skipped XLOG_RUNNING_XACTS re

2017-05-06 Thread Andres Freund
Fix off-by-one possibly leading to skipped XLOG_RUNNING_XACTS records.

Since 6ef2eba3f57f1 ("Skip checkpoints, archiving on idle systems."),
GetLastImportantRecPtr() is used to avoid performing superfluous
checkpoints, xlog switches, running-xact records when the system is
idle.  Unfortunately the check concerning running-xact records had a
off-by-one error, leading to such records being potentially skipped
when only a single record has been inserted since the last
running-xact record.

An alternative approach would have been to change
GetLastImportantRecPtr()'s definition to point to the end of records,
but that would make the checkpoint code more complicated.

Author: Andres Freund
Discussion: 
https://postgr.es/m/20170505012447.wsrympaxnfis6...@alap3.anarazel.de
Backpatch: no, code only present in master

Branch
--
master

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

Modified Files
--
src/backend/postmaster/bgwriter.c | 7 +--
src/backend/postmaster/checkpointer.c | 3 ++-
2 files changed, 7 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: Second pass on 9.6.3 release notes.

2017-05-06 Thread Tom Lane
Second pass on 9.6.3 release notes.

Improve description of logical decoding snapshot issues, per suggestion
from Petr Jelinek.  Mention possible need to re-sync logical replicas
as a post-upgrade task.  Minor copy-editing for some other items.

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/334b82cd56a65e09154d9f930d35a761a9c5cfab

Modified Files
--
doc/src/sgml/release-9.6.sgml | 100 +++---
1 file changed, 56 insertions(+), 44 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: Document current_role.

2017-05-06 Thread Tom Lane
Document current_role.

This system function has been there a very long time, but somehow escaped
being listed in func.sgml.

Fabien Coelho and Tom Lane

Discussion: https://postgr.es/m/alpine.DEB.2.20.1705061027580.3896@lancre

Branch
--
REL9_5_STABLE

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

Modified Files
--
doc/src/sgml/func.sgml | 22 --
1 file changed, 20 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: Document current_role.

2017-05-06 Thread Tom Lane
Document current_role.

This system function has been there a very long time, but somehow escaped
being listed in func.sgml.

Fabien Coelho and Tom Lane

Discussion: https://postgr.es/m/alpine.DEB.2.20.1705061027580.3896@lancre

Branch
--
master

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

Modified Files
--
doc/src/sgml/func.sgml | 22 --
1 file changed, 20 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: Document current_role.

2017-05-06 Thread Tom Lane
Document current_role.

This system function has been there a very long time, but somehow escaped
being listed in func.sgml.

Fabien Coelho and Tom Lane

Discussion: https://postgr.es/m/alpine.DEB.2.20.1705061027580.3896@lancre

Branch
--
REL9_3_STABLE

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

Modified Files
--
doc/src/sgml/func.sgml | 22 --
1 file changed, 20 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: Document current_role.

2017-05-06 Thread Tom Lane
Document current_role.

This system function has been there a very long time, but somehow escaped
being listed in func.sgml.

Fabien Coelho and Tom Lane

Discussion: https://postgr.es/m/alpine.DEB.2.20.1705061027580.3896@lancre

Branch
--
REL9_2_STABLE

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

Modified Files
--
doc/src/sgml/func.sgml | 22 --
1 file changed, 20 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: Document current_role.

2017-05-06 Thread Tom Lane
Document current_role.

This system function has been there a very long time, but somehow escaped
being listed in func.sgml.

Fabien Coelho and Tom Lane

Discussion: https://postgr.es/m/alpine.DEB.2.20.1705061027580.3896@lancre

Branch
--
REL9_4_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/8c681454dca0cf6a4dc8b48ca900851c046c4592

Modified Files
--
doc/src/sgml/func.sgml | 22 --
1 file changed, 20 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: Document current_role.

2017-05-06 Thread Tom Lane
Document current_role.

This system function has been there a very long time, but somehow escaped
being listed in func.sgml.

Fabien Coelho and Tom Lane

Discussion: https://postgr.es/m/alpine.DEB.2.20.1705061027580.3896@lancre

Branch
--
REL9_6_STABLE

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

Modified Files
--
doc/src/sgml/func.sgml | 22 --
1 file changed, 20 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