Re: pgsql: Set random seed for pgbench.

2018-03-30 Thread Tom Lane
Teodor Sigaev writes: > Set random seed for pgbench. So this patch has ignored the possibility of not having pg_strong_random. That's moving the portability goalposts in a way that I do not find acceptable for such a marginal feature. What behavior do you think we should have

pgsql: Portability fix for commit 9a895462d.

2018-03-30 Thread Tom Lane
Portability fix for commit 9a895462d. So far as I can find, NI_MAXHOST isn't actually required anywhere by POSIX. Nonetheless, commit 9a895462d supposed that it could rely on having that symbol without any ceremony at all. We do have a hack for providing it if the platform doesn't, in

pgsql: Remove PARTIAL_LINKING build mode.

2018-03-30 Thread Andres Freund
Remove PARTIAL_LINKING build mode. In 9956ddc19164b02dc1925fb389a1af77472eba5e, ten years ago, the current objfile.txt based linking model was introduced. It's time to retire the old SUBSYS.o based model. This primarily is pertinent because the bitcode files for LLVM based inlining are not

pgsql: Fix bug with view locking code.

2018-03-30 Thread Tatsuo Ishii
Fix bug with view locking code. LockViewRecurese() obtains view relation using heap_open() and passes it to get_view_query() to get view info. It immediately closes the relation then uses the returned view info by calling LockViewRecurse_walker(). Since get_view_query() returns a pointer within

pgsql: Add SKIP_LOCKED option to RangeVarGetRelidExtended().

2018-03-30 Thread Andres Freund
Add SKIP_LOCKED option to RangeVarGetRelidExtended(). This will be used for VACUUM (SKIP LOCKED). Author: Nathan Bossart Reviewed-By: Michael Paquier and Andres Freund Discussion: https://postgr.es/m/20180306005349.b65whmvj7z6hb...@alap3.anarazel.de Branch -- master Details ---

pgsql: Combine options for RangeVarGetRelidExtended() into a flags argu

2018-03-30 Thread Andres Freund
Combine options for RangeVarGetRelidExtended() into a flags argument. A followup patch will add a SKIP_LOCKED option. To avoid introducing evermore arguments, breaking existing callers each time, introduce a flags argument. This'll no doubt break a few external users... Also change the

pgsql: Enhance pg_stat_wal_receiver view to display host and port of se

2018-03-30 Thread Fujii Masao
Enhance pg_stat_wal_receiver view to display host and port of sender server. Previously there was no way in the standby side to find out the host and port of the sender server that the walreceiver was currently connected to when multiple hosts and ports were specified in primary_conninfo. For

pgsql: Fix bogus provolatile/proparallel markings on a few built-in fun

2018-03-30 Thread Tom Lane
Fix bogus provolatile/proparallel markings on a few built-in functions. Richard Yen reported that pg_upgrade failed if the target cluster had force_parallel_mode = on, because binary_upgrade_create_empty_extension() is marked parallel restricted, allowing it to be executed in parallel mode, which

pgsql: Fix bogus provolatile/proparallel markings on a few built-in fun

2018-03-30 Thread Tom Lane
Fix bogus provolatile/proparallel markings on a few built-in functions. Richard Yen reported that pg_upgrade failed if the target cluster had force_parallel_mode = on, because binary_upgrade_create_empty_extension() is marked parallel restricted, allowing it to be executed in parallel mode, which

pgsql: Fix bogus provolatile/proparallel markings on a few built-in fun

2018-03-30 Thread Tom Lane
Fix bogus provolatile/proparallel markings on a few built-in functions. Richard Yen reported that pg_upgrade failed if the target cluster had force_parallel_mode = on, because binary_upgrade_create_empty_extension() is marked parallel restricted, allowing it to be executed in parallel mode, which

pgsql: Fix bogus provolatile/proparallel markings on a few built-in fun

2018-03-30 Thread Tom Lane
Fix bogus provolatile/proparallel markings on a few built-in functions. Richard Yen reported that pg_upgrade failed if the target cluster had force_parallel_mode = on, because binary_upgrade_create_empty_extension() is marked parallel restricted, allowing it to be executed in parallel mode, which

pgsql: Fix bogus provolatile/proparallel markings on a few built-in fun

2018-03-30 Thread Tom Lane
Fix bogus provolatile/proparallel markings on a few built-in functions. Richard Yen reported that pg_upgrade failed if the target cluster had force_parallel_mode = on, because binary_upgrade_create_empty_extension() is marked parallel restricted, allowing it to be executed in parallel mode, which

pgsql: Ensure that WAL pages skipped by a forced WAL switch are zero-fi

2018-03-30 Thread Tom Lane
Ensure that WAL pages skipped by a forced WAL switch are zero-filled. In the previous coding, skipped pages were mostly zeroes, but they still had valid WAL page headers. That makes them very much less compressible than an unbroken string of zeroes would be --- about 10X worse for bzip2

pgsql: Remove obsolete SLRU wrapping and warnings from predicate.c.

2018-03-30 Thread Tom Lane
Remove obsolete SLRU wrapping and warnings from predicate.c. When SSI was developed, slru.c was limited to segment files with names in the range -. This didn't allow enough space for predicate.c to store every possible XID when spilling old transactions to disk, so it would wrap around

pgsql: docs: add parameter with brackets around varbit()

2018-03-30 Thread Bruce Momjian
docs: add parameter with brackets around varbit() Reported-by: scott@caseware.com Discussion: https://postgr.es/m/152074343671.1853.18284519607571497...@wrigleys.postgresql.org Author: Euler Taveira Backpatch-through: 9.3 Branch -- REL9_3_STABLE Details ---

pgsql: docs: add parameter with brackets around varbit()

2018-03-30 Thread Bruce Momjian
docs: add parameter with brackets around varbit() Reported-by: scott@caseware.com Discussion: https://postgr.es/m/152074343671.1853.18284519607571497...@wrigleys.postgresql.org Author: Euler Taveira Backpatch-through: 9.3 Branch -- REL9_4_STABLE Details ---

pgsql: docs: add parameter with brackets around varbit()

2018-03-30 Thread Bruce Momjian
docs: add parameter with brackets around varbit() Reported-by: scott@caseware.com Discussion: https://postgr.es/m/152074343671.1853.18284519607571497...@wrigleys.postgresql.org Author: Euler Taveira Backpatch-through: 9.3 Branch -- REL9_6_STABLE Details ---

pgsql: Do index FSM vacuuming sooner.

2018-03-30 Thread Tom Lane
Do index FSM vacuuming sooner. In btree and SP-GiST indexes, move the responsibility for calling IndexFreeSpaceMapVacuum from the vacuumcleanup phase to the bulkdelete phase, and do it if and only if we found some pages that could be put into FSM. As in commit 851a26e26, the idea is to make free

pgsql: Don't call IS_DUMMY_REL() when cheapest_total_path might be junk

2018-03-30 Thread Robert Haas
Don't call IS_DUMMY_REL() when cheapest_total_path might be junk. Unlike the previous coding, this might result in a Gather per Append subplan when the target list is parallel-restricted, but such a plan is probably worth considering in that case, since a single Gather on top of the entire Append

pgsql: docs: add parameter with brackets around varbit()

2018-03-30 Thread Bruce Momjian
docs: add parameter with brackets around varbit() Reported-by: scott@caseware.com Discussion: https://postgr.es/m/152074343671.1853.18284519607571497...@wrigleys.postgresql.org Author: Euler Taveira Backpatch-through: 10 Branch -- REL_10_STABLE Details ---

pgsql: docs: add parameter with brackets around varbit()

2018-03-30 Thread Bruce Momjian
docs: add parameter with brackets around varbit() Reported-by: scott@caseware.com Discussion: https://postgr.es/m/152074343671.1853.18284519607571497...@wrigleys.postgresql.org Author: Euler Taveira Backpatch-through: 10 Branch -- master Details ---

pgsql: Predicate locking in GIN index

2018-03-30 Thread Teodor Sigaev
Predicate locking in GIN index Predicate locks are used on per page basis only if fastupdate = off, in opposite case predicate lock on pending list will effectively lock whole index, to reduce locking overhead, just lock a relation. Entry and posting trees are essentially B-tree, so locks are

pgsql: Fix typo in comment

2018-03-30 Thread Magnus Hagander
Fix typo in comment Author: Michael Paquier Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/019fa576ca8298ecb7b8ded6e0c857840b57a4ae Modified Files -- src/backend/access/transam/xlog.c | 2 +- 1 file changed, 1 insertion(+), 1