pgsql: Fix test_predtest's idea of what weak refutation means.

2018-03-08 Thread Tom Lane
Fix test_predtest's idea of what weak refutation means. I'd initially supposed that predicate_refuted_by(..., true) ought to say that "A refutes B" means "non-falsity of A implies non-truth of B". But it seems better to define it as "truth of A implies non-truth of B". This is more useful in the c

pgsql: Correctly assess parallel-safety of tlists when SRFs are used.

2018-03-08 Thread Robert Haas
Correctly assess parallel-safety of tlists when SRFs are used. Since commit 69f4b9c85f168ae006929eec44fc44d569e846b9, the existing code was no longer assessing the parallel-safety of the real tlist for each upper rel, but rather the first of possibly several tlists created by split_pathtarget_at_s

pgsql: Fix warnings in man page build

2018-03-08 Thread Peter Eisentraut
Fix warnings in man page build The changes in the CREATE POLICY man page from commit 87c2a17fee784c7e1004ba3d3c5d8147da676783 triggered a stylesheet bug that created some warning messages and incorrect output. This installs a workaround. Also improve the whitespace a bit so it looks better. Bra

pgsql: Fix warnings in man page build

2018-03-08 Thread Peter Eisentraut
Fix warnings in man page build The changes in the CREATE POLICY man page from commit 87c2a17fee784c7e1004ba3d3c5d8147da676783 triggered a stylesheet bug that created some warning messages and incorrect output. This installs a workaround. Also improve the whitespace a bit so it looks better. Bra

pgsql: Fix warnings in man page build

2018-03-08 Thread Peter Eisentraut
Fix warnings in man page build The changes in the CREATE POLICY man page from commit 87c2a17fee784c7e1004ba3d3c5d8147da676783 triggered a stylesheet bug that created some warning messages and incorrect output. This installs a workaround. Also improve the whitespace a bit so it looks better. Bra

pgsql: Add test scaffolding for exercising optimizer's predicate-proof

2018-03-08 Thread Tom Lane
Add test scaffolding for exercising optimizer's predicate-proof logic. The predicate-proof code in predtest.c is a bit hard to test as-is: you have to construct a query whose plan changes depending on the success of a test, and in tests that have been around for awhile, it's always possible that t

pgsql: Revert "Temporarily instrument postgres_fdw test to look for sta

2018-03-08 Thread Tom Lane
Revert "Temporarily instrument postgres_fdw test to look for statistics changes." This reverts commit c2c537c56dc30ec3cdc12051f4ea5363aa66d73c. It's now clear that whatever is going on there, it can't be blamed on unexpected ANALYZE runs, because the statistics are the same just before the failin

pgsql: In initdb, don't bother trying max_connections = 10.

2018-03-08 Thread Tom Lane
In initdb, don't bother trying max_connections = 10. The server won't actually start with that setting anymore, not since we raised the default max_wal_senders to 10. Per discussion, we don't wish to back down on that default, so instead raise the effective floor for max_connections (to 20). It'

pgsql: In initdb, don't bother trying max_connections = 10.

2018-03-08 Thread Tom Lane
In initdb, don't bother trying max_connections = 10. The server won't actually start with that setting anymore, not since we raised the default max_wal_senders to 10. Per discussion, we don't wish to back down on that default, so instead raise the effective floor for max_connections (to 20). It'

pgsql: Fix cross-checking of ReservedBackends/max_wal_senders/MaxConnec

2018-03-08 Thread Tom Lane
Fix cross-checking of ReservedBackends/max_wal_senders/MaxConnections. We were independently checking ReservedBackends < MaxConnections and max_wal_senders < MaxConnections, but because walsenders aren't allowed to use superuser-reserved connections, that's really the wrong thing. Correct behavior