pgsql: doc: Suggest logical replication more prominently for upgrading

2018-06-11 Thread Peter Eisentraut
doc: Suggest logical replication more prominently for upgrading The previous wording suggested only Slony, and there are more options available. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/8f6c94272c485bb812aebe063fc412326a17b880 Modified Files -- d

pgsql: Fix access to just-closed relcache entry.

2018-06-11 Thread Tom Lane
Fix access to just-closed relcache entry. It might be impossible for this to cause a problem in non-debug builds, since there'd be no opportunity for the relcache entry to get recycled before the fetch. It blows up nicely with -DRELCACHE_FORCE_RELEASE plus valgrind, though. Evidently introduced

pgsql: Fix access to just-closed relcache entry.

2018-06-11 Thread Tom Lane
Fix access to just-closed relcache entry. It might be impossible for this to cause a problem in non-debug builds, since there'd be no opportunity for the relcache entry to get recycled before the fetch. It blows up nicely with -DRELCACHE_FORCE_RELEASE plus valgrind, though. Evidently introduced

Re: [COMMITTERS] pgsql: Logical replication

2018-06-11 Thread Andres Freund
Hi, On 2017-01-20 14:06:18 +, Peter Eisentraut wrote: > Logical replication > > - Add PUBLICATION catalogs and DDL > - Add SUBSCRIPTION catalog and DDL > - Define logical replication protocol and output plugin > - Add logical replication workers I know I mentioned this before, but I just hit

pgsql: Fix oversight from 9e149c8 with spin-lock handling

2018-06-11 Thread Michael Paquier
Fix oversight from 9e149c8 with spin-lock handling Calling an external function while a pin-lock is held is a bad idea as those are designed to be short-lived. The stress of a first commit into a large git history may contribute to that. Reported-by: Andres Freund Discussion: https://postgr.es/

Re: pgsql: Fix and document lock handling for in-memory replication slot da

2018-06-11 Thread Michael Paquier
On Mon, Jun 11, 2018 at 09:49:52AM -0700, Andres Freund wrote: > Same is true for the codepaths calling GetRedoRecPtr(). You are right. I'll fix in a minute. A first commit's stress make things really harder to get right... > I don't object to the general idea of adding locking - although the >

pgsql: Improve commentary about run-time partition pruning data structu

2018-06-11 Thread Tom Lane
Improve commentary about run-time partition pruning data structures. No code changes except for a couple of new Asserts. David Rowley and Tom Lane Discussion: https://postgr.es/m/cakjs1f-6godrngetdpxcnapme2h2htztb6lmtfdmcyaaoe0...@mail.gmail.com Branch -- master Details --- https://gi

pgsql: Improve ExecFindInitialMatchingSubPlans's subplan renumbering lo

2018-06-11 Thread Tom Lane
Improve ExecFindInitialMatchingSubPlans's subplan renumbering logic. We don't need two passes if we scan child partitions before parents, as that way the children's present_parts are up to date before they're needed. I (tgl) think there's actually a bug being fixed here, for the case of an interm

pgsql: Adjust error message

2018-06-11 Thread Peter Eisentraut
Adjust error message Makes it look more similar to other ones, and avoids the need for pluralization. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/e5d11b91e42e20ff80effb946cb461c490d491ba Modified Files -- src/common/controldata_utils.c | 4 ++-- 1 fi

pgsql: Don't needlessly check the partition contraint twice

2018-06-11 Thread Alvaro Herrera
Don't needlessly check the partition contraint twice Starting with commit f0e44751d717, ExecConstraints was in charge of running the partition constraint; commit 19c47e7c8202 modified that so that caller could request to skip that checking depending on some conditions, but that commit and 15ce775f

pgsql: Add a script to detect perl compile time errors and warnings

2018-06-11 Thread Andrew Dunstan
Add a script to detect perl compile time errors and warnings Also add a function that centralizes the logic for locating all our perl files and use it in pgperlcritic and pgperltidy as well as the new pgperlcheck. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/af61

pgsql: Move perlcritic files to new perlcheck directory

2018-06-11 Thread Andrew Dunstan
Move perlcritic files to new perlcheck directory Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/85dd744a70d167ca86e83ea38f5ac3e1449bb028 Modified Files -- src/tools/{pgperlcritic => perlcheck}/perlcriticrc | 2 +- src/tools/{pgperlcritic => perlcheck}/pg

Re: pgsql: Fix and document lock handling for in-memory replication slot da

2018-06-11 Thread Andres Freund
Hi, On 2018-06-10 10:45:04 +, Michael Paquier wrote: > Fix and document lock handling for in-memory replication slot data > > While debugging issues on HEAD for the new slot forwarding feature of > Postgres 11, some monitoring of the code surrounding in-memory slot data > has proved that the l

pgsql: Fix run-time partition pruning code to handle NULL values proper

2018-06-11 Thread Tom Lane
Fix run-time partition pruning code to handle NULL values properly. The previous coding just ignored pruning constraints that compare a partition key to a null-valued expression. This is silly, since really what we can do there is conclude that all partitions are rejected: the pruning operator is

pgsql: Make new error code name match SQL standard more closely

2018-06-11 Thread Peter Eisentraut
Make new error code name match SQL standard more closely Discussion: https://www.postgresql.org/message-id/dff3d555-bea4-ac24-29b2-29521b9d08e8%402ndquadrant.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/387543f7bdf0f1ca3dc06e6bb5c9ef7980cf9f44 Modified File

pgsql: Update config.guess and config.sub

2018-06-11 Thread Peter Eisentraut
Update config.guess and config.sub Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/bfbb13264ae76a952a8312091d600db110b1c0eb Modified Files -- config/config.guess | 572 +- config/config.sub | 1652 +--