pgsql: Don't allow LIMIT/OFFSET clause within sub-selects to be pushed

2018-09-13 Thread Amit Kapila
Don't allow LIMIT/OFFSET clause within sub-selects to be pushed to workers. Allowing sub-select containing LIMIT/OFFSET in workers can lead to inconsistent results at the top-level as there is no guarantee that the row order will be fully deterministic. The fix is to prohibit pushing LIMIT/OFFSET

pgsql: Don't allow LIMIT/OFFSET clause within sub-selects to be pushed

2018-09-13 Thread Amit Kapila
Don't allow LIMIT/OFFSET clause within sub-selects to be pushed to workers. Allowing sub-select containing LIMIT/OFFSET in workers can lead to inconsistent results at the top-level as there is no guarantee that the row order will be fully deterministic. The fix is to prohibit pushing LIMIT/OFFSET

pgsql: Don't allow LIMIT/OFFSET clause within sub-selects to be pushed

2018-09-13 Thread Amit Kapila
Don't allow LIMIT/OFFSET clause within sub-selects to be pushed to workers. Allowing sub-select containing LIMIT/OFFSET in workers can lead to inconsistent results at the top-level as there is no guarantee that the row order will be fully deterministic. The fix is to prohibit pushing LIMIT/OFFSET

pgsql: Don't allow LIMIT/OFFSET clause within sub-selects to be pushed

2018-09-13 Thread Amit Kapila
Don't allow LIMIT/OFFSET clause within sub-selects to be pushed to workers. Allowing sub-select containing LIMIT/OFFSET in workers can lead to inconsistent results at the top-level as there is no guarantee that the row order will be fully deterministic. The fix is to prohibit pushing LIMIT/OFFSET

pgsql: Back-patch "Fix parallel hash join path search."

2018-09-13 Thread Amit Kapila
Back-patch "Fix parallel hash join path search." Back-patch commit 655393a022bd653e2b48dbf20b69236981e35195 to 9.6. This synchronizes the relavant code and helps in generating parallel paths in some cases in 9.6. This also helps in back-patch of future patches where we can get the same plan in a

pgsql: Allow concurrent-safe open() and fopen() in frontend code for Wi

2018-09-13 Thread Michael Paquier
Allow concurrent-safe open() and fopen() in frontend code for Windows PostgreSQL uses a custom wrapper for open() and fopen() which is concurrent-safe, allowing multiple processes to open and work on the same file. This has a couple of advantages: - pg_test_fsync does not handle O_DSYNC correctly

pgsql: Improve autovacuum logging for aggressive and anti-wraparound ru

2018-09-13 Thread Michael Paquier
Improve autovacuum logging for aggressive and anti-wraparound runs A log message was being generated when log_min_duration is reached for autovacuum on a given relation to indicate if it was an aggressive run, and missed the point of mentioning if it is doing an anti-wrapround run. The log messag

pgsql: Message style improvements

2018-09-13 Thread Peter Eisentraut
Message style improvements Fix one untranslatable string concatenation in pg_rewind. Fix one message in pg_verify_checksums to use a style use elsewhere and avoid plural issues. Fix one gratuitous abbreviation in psql. Branch -- master Details --- https://git.postgresql.org/pg/commitdi

pgsql: Message style improvements

2018-09-13 Thread Peter Eisentraut
Message style improvements Fix one untranslatable string concatenation in pg_rewind. Fix one message in pg_verify_checksums to use a style use elsewhere and avoid plural issues. Fix one gratuitous abbreviation in psql. Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/c

pgsql: Detect LLVM 7 without specifying binaries explicitly.

2018-09-13 Thread Andres Freund
Detect LLVM 7 without specifying binaries explicitly. Before this commit LLVM 7 was supported, but only if one explicitly provided LLVM_CONFIG= and CLANG= paths. As LLVM 7 is the first version that includes our upstreamed debugging and profiling features, and as debian is planning to default to 7

pgsql: Detect LLVM 7 without specifying binaries explicitly.

2018-09-13 Thread Andres Freund
Detect LLVM 7 without specifying binaries explicitly. Before this commit LLVM 7 was supported, but only if one explicitly provided LLVM_CONFIG= and CLANG= paths. As LLVM 7 is the first version that includes our upstreamed debugging and profiling features, and as debian is planning to default to 7

pgsql: Attempt to identify system timezone by reading /etc/localtime sy

2018-09-13 Thread Tom Lane
Attempt to identify system timezone by reading /etc/localtime symlink. On many modern platforms, /etc/localtime is a symlink to a file within the IANA database. Reading the symlink lets us find out the name of the system timezone directly, without going through the brute-force search embodied in

pgsql: Attach FPI to the first record after full_page_writes is turned

2018-09-13 Thread Amit Kapila
Attach FPI to the first record after full_page_writes is turned on. XLogInsert fails to attach a required FPI to the first record after full_page_writes is turned on by the last checkpoint. This bug got introduced in 9.5 due to code rearrangement in commits 2c03216d83 and 2076db2aea. Fix it by e

pgsql: Attach FPI to the first record after full_page_writes is turned

2018-09-13 Thread Amit Kapila
Attach FPI to the first record after full_page_writes is turned on. XLogInsert fails to attach a required FPI to the first record after full_page_writes is turned on by the last checkpoint. This bug got introduced in 9.5 due to code rearrangement in commits 2c03216d83 and 2076db2aea. Fix it by e

pgsql: Attach FPI to the first record after full_page_writes is turned

2018-09-13 Thread Amit Kapila
Attach FPI to the first record after full_page_writes is turned on. XLogInsert fails to attach a required FPI to the first record after full_page_writes is turned on by the last checkpoint. This bug got introduced in 9.5 due to code rearrangement in commits 2c03216d83 and 2076db2aea. Fix it by e

pgsql: Attach FPI to the first record after full_page_writes is turned

2018-09-13 Thread Amit Kapila
Attach FPI to the first record after full_page_writes is turned on. XLogInsert fails to attach a required FPI to the first record after full_page_writes is turned on by the last checkpoint. This bug got introduced in 9.5 due to code rearrangement in commits 2c03216d83 and 2076db2aea. Fix it by e

pgsql: Attach FPI to the first record after full_page_writes is turned

2018-09-13 Thread Amit Kapila
Attach FPI to the first record after full_page_writes is turned on. XLogInsert fails to attach a required FPI to the first record after full_page_writes is turned on by the last checkpoint. This bug got introduced in 9.5 due to code rearrangement in commits 2c03216d83 and 2076db2aea. Fix it by e

pgsql: Simplify static function in extension.c

2018-09-13 Thread Michael Paquier
Simplify static function in extension.c An extra argument for the filename defining the extension script location was present, aimed at being used for error reporting, but has never been used. This was around since extensions have been added in d9572c4. Author: Yugo Nagata Reviewed-by: Tatsuo Is