pgsql: Postpone calculating total_table_pages until after pruning/exclu

2018-11-07 Thread Tom Lane
Postpone calculating total_table_pages until after pruning/exclusion. The planner doesn't make any use of root->total_table_pages until it estimates costs of indexscans, so we don't need to compute it as early as that's currently done. By doing the calculation between set_base_rel_sizes and set_b

pgsql: Use installcheck-parallel in pg_upgrade's testsuite.

2018-11-07 Thread Andres Freund
Use installcheck-parallel in pg_upgrade's testsuite. The installcheck run takes a sizable fraction of test.sh to run. Using a parallel schedule reduces that noticably. It's possible that we want to backpatch this at some point, to reduce buildfarm times, but for now lets just see if this upsets t

pgsql: Build HashState's hashkeys expression with the correct parent.

2018-11-07 Thread Andres Freund
Build HashState's hashkeys expression with the correct parent. Previously the expressions were built with the HashJoinState as a parent. That's incorrect. Currently this does not appear to be harmful, but for the upcoming 'slot abstraction' work this proves to be problematic, as the underlying sl

pgsql: pg_upgrade: Allow use of file cloning

2018-11-07 Thread Peter Eisentraut
pg_upgrade: Allow use of file cloning Add another transfer mode --clone to pg_upgrade (besides the existing --link and the default copy), using special file cloning calls. This makes the file transfer faster and more space efficient, achieving speed similar to --link mode without the associated d

pgsql: Quiet valgrind complaints following pread/pwrite changes

2018-11-07 Thread Andrew Dunstan
Quiet valgrind complaints following pread/pwrite changes Per complaints from buildfarm and elsewhere Patch from Jasper Pedersen Discussion: https://postgr.es/m/0f419c91-49ab-2399-0143-13063bd97...@redhat.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/517b0d0b5f

pgsql: Move EEOP_*_SYSVAR evaluation out of line.

2018-11-07 Thread Andres Freund
Move EEOP_*_SYSVAR evaluation out of line. This mainly de-duplicates code. As evaluating a system variable isn't the hottest path and the current inline implementation ends up calling out to an external function anyway, this is OK from a performance POV. The main motivation for de-duplicating is

pgsql: Use parallel installcheck in vcregress.pl's upgrade test

2018-11-07 Thread Andrew Dunstan
Use parallel installcheck in vcregress.pl's upgrade test This is to keep the test in sync with what's done in test.sh, which acquired this change in commit da906766c. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/54ad7282fe7ad80a15533546d3b0a2be2e19e3f6 Modified

Re: pgsql: Move EEOP_*_SYSVAR evaluation out of line.

2018-11-07 Thread Tom Lane
Andres Freund writes: > Move EEOP_*_SYSVAR evaluation out of line. Seems like many of your JIT-enabled animals don't like this. regards, tom lane

pgsql: Fix inadequate autoconfiscation of copyfile() usage.

2018-11-07 Thread Tom Lane
Fix inadequate autoconfiscation of copyfile() usage. Per buildfarm, HAVE_COPYFILE is not the same thing as HAVE_COPYFILE_H. Add the extra configure test. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c3e6d5d38699812e047270a711be1926b7f6f396 Modified Files ---

Re: pgsql: Fix copy-paste error in errhint() introduced in 691d79a07933.

2018-11-07 Thread Christoph Berg
Re: Andres Freund 2018-11-05 > Fix copy-paste error in errhint() introduced in 691d79a07933. > > Reported-By: Petr Jelinek > Discussion: > https://postgr.es/m/c95a620b-34f0-7930-aeb5-f7ab804f2...@2ndquadrant.com > Backpatch: 9.4-, like the previous commit -errhint("Change wal_le

pgsql: Fixup for b84a6dafbf triggering assert failure in LLVM debug bui

2018-11-07 Thread Andres Freund
Fixup for b84a6dafbf triggering assert failure in LLVM debug builds. Author: Andres Freund Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/c14a8ff27e26155345e554a9636bab8236500bb9 Modified Files -- src/backend/jit/llvm/llvmjit_expr.c | 2 +- 1 file chang

Re: pgsql: Fix copy-paste error in errhint() introduced in 691d79a07933.

2018-11-07 Thread Andres Freund
Hi, On 2018-11-07 22:32:22 +0100, Christoph Berg wrote: > Re: Andres Freund 2018-11-05 > > Fix copy-paste error in errhint() introduced in 691d79a07933. > > > > Reported-By: Petr Jelinek > > Discussion: > > https://postgr.es/m/c95a620b-34f0-7930-aeb5-f7ab804f2...@2ndquadrant.com > > Backpatch:

Re: pgsql: Move EEOP_*_SYSVAR evaluation out of line.

2018-11-07 Thread Andres Freund
Hi, On 2018-11-07 16:23:13 -0500, Tom Lane wrote: > Andres Freund writes: > > Move EEOP_*_SYSVAR evaluation out of line. > > Seems like many of your JIT-enabled animals don't like this. Thanks. Yea, it's the animals that have the (pretty expensive) LLVM assertions enabled. I've pushed the trivi