[COMMITTERS] pgsql: Don't call the function that may raise an error while holding sp

2017-04-20 Thread Fujii Masao
Don't call the function that may raise an error while holding spinlock.

It's not safe to raise an error while holding spinlock. But previously
logical replication worker for table sync called the function which
reads the system catalog and may raise an error while it's holding
spinlock. Which could lead to the trouble where spinlock will never
be released and the server gets stuck infinitely.

Author: Petr Jelinek
Reviewed-by: Kyotaro Horiguchi and Fujii Masao
Reported-by: Fujii Masao
Discussion: 
http://postgr.es/m/CAHGQGwFDWh_Qr-q_GEMpD+qH=vYPMdVqw=zosy3kx_pna9r...@mail.gmail.com

Branch
--
master

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

Modified Files
--
src/backend/replication/logical/tablesync.c | 15 +--
1 file changed, 9 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: Mark some columns in pg_subscription as NOT NULL.

2017-04-20 Thread Fujii Masao
Mark some columns in pg_subscription as NOT NULL.

In pg_subscription, subconninfo, subslotname, subsynccommit and
subpublications are expected not to be NULL. Therefore this patch
adds BKI_FORCE_NOT_NULL markings to them.

This patch is basically unnecessary unless the code has a bug which
wrongly sets either of those columns to NULL. But it's good to have
this as a safeguard.

Author: Masahiko Sawada
Reviewed-by: Kyotaro Horiguchi
Reported-by: Fujii Masao
Discussion: 
http://postgr.es/m/CAHGQGwFDWh_Qr-q_GEMpD+qH=vYPMdVqw=zosy3kx_pna9r...@mail.gmail.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/88b0a31926331eb5336ec92010b3b4f7e6efb53c

Modified Files
--
src/include/catalog/pg_subscription.h | 15 +++
1 file changed, 11 insertions(+), 4 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: Prevent log_replication_commands from causing SQL commands to be

2017-04-20 Thread Fujii Masao
Prevent log_replication_commands from causing SQL commands to be logged.

Commit 7c4f524 allowed walsender to execute normal SQL commands
to support table sync feature in logical replication. Previously
while log_statement caused such SQL commands to be logged,
log_replication_commands caused them to be logged, too.
That is, such SQL commands were logged twice unexpectedly
when those settings were both enabled.

This commit forces log_replication_commands to log only replication
commands, to prevent normal SQL commands from being logged twice.

Author: Masahiko Sawada
Reviewed-by: Kyotaro Horiguchi
Reported-by: Fujii Masao
Discussion: 
http://postgr.es/m/CAHGQGwFDWh_Qr-q_GEMpD+qH=vYPMdVqw=zosy3kx_pna9r...@mail.gmail.com

Branch
--
master

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

Modified Files
--
src/backend/replication/walsender.c | 18 ++
1 file changed, 10 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: Modify message when partitioned table is added to publication

2017-04-20 Thread Peter Eisentraut
Modify message when partitioned table is added to publication

Give a more specific error message than "xyz is not a table".

Also document in CREATE PUBLICATION which kinds of relations are not
supported.

based on patch by Amit Langote 

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/594b526bcf32e307b963ea77f10c9720d9ca423f

Modified Files
--
doc/src/sgml/ref/create_publication.sgml  | 8 
src/backend/catalog/pg_publication.c  | 9 +
src/test/regress/expected/publication.out | 7 +++
src/test/regress/sql/publication.sql  | 4 
4 files changed, 28 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: Sync pg_ctl documentation and usage message with reality.

2017-04-20 Thread Tom Lane
Sync pg_ctl documentation and usage message with reality.

Commit 05cd12ed5 ("pg_ctl: Change default to wait for all actions")
was a tad sloppy about updating the documentation to match.  The
documentation was also sorely in need of a copy-editing pass, having
been adjusted at different times by different people who took little
care to maintain consistency of style.

Branch
--
master

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

Modified Files
--
doc/src/sgml/ref/pg_ctl-ref.sgml | 205 +--
src/bin/pg_ctl/pg_ctl.c  |  29 +++---
2 files changed, 123 insertions(+), 111 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 multivariate statistics documentation

2017-04-20 Thread Alvaro Herrera
Improve multivariate statistics documentation

Extended statistics commit 7b504eb282c did not include appropriate
documentation next to where we document regular planner statistics (I
ripped what was submitted before commit and then forgot to put it back),
and while later commit 2686ee1b7ccf added some material, it structurally
depended on what I had ripped out, so the end result wasn't proper.

Fix those problems by shuffling what was added by 2686ee1b7ccf and
including some additional material, so that now chapter 14 "Performance
Tips" now describes the types of multivariate statistics we currently
have, and chapter 68 "How the Planner Uses Statistics" shows some
examples.  The new text should be more in line with previous material,
in (hopefully) the appropriate depth.

While at it, fix a small bug in pg_statistic_ext docs: one column was
listed in the wrong spot.

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/919f6d746e45c8fe84d02799053ef47c3bb11050

Modified Files
--
doc/src/sgml/catalogs.sgml  |  22 ++---
doc/src/sgml/perform.sgml   | 195 +
doc/src/sgml/planstats.sgml | 228 
3 files changed, 311 insertions(+), 134 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: Add missing erand48.c to libpq/.gitignore.

2017-04-20 Thread Tom Lane
Add missing erand48.c to libpq/.gitignore.

Oversight in commit 818fd4a67.  While at it, sync order of file list
in .gitignore with those in the Makefile.

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/77c316be7e6950990f21ba58f78ce67db1950fa9

Modified Files
--
src/interfaces/libpq/.gitignore | 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