pgsql: Fix some spurious new compiler warnings in MSVC.

2018-11-17 Thread Andres Freund
Fix some spurious new compiler warnings in MSVC. Per buildfarm animal bowerbird. Discussion: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=bowerbird&dt=2018-11-17%2002%3A30%3A20 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/73616126b4dcd01c833b06d45729

pgsql: Leave SIGTTIN/SIGTTOU signal handling alone in postmaster child

2018-11-17 Thread Tom Lane
Leave SIGTTIN/SIGTTOU signal handling alone in postmaster child processes. For reasons lost in the mists of time, most postmaster child processes reset SIGTTIN/SIGTTOU signal handling to SIG_DFL, with the major exception that backend sessions do not. It seems like a pretty bad idea for any postma

pgsql: Avoid defining SIGTTIN/SIGTTOU on Windows.

2018-11-17 Thread Tom Lane
Avoid defining SIGTTIN/SIGTTOU on Windows. Setting them to SIG_IGN seems unlikely to have any beneficial effect on that platform, and given the signal numbering collision with SIGABRT, it could easily have bad effects. Given the lack of field complaints that can be traced to this, I don't present

pgsql: Add valgrind suppressions for wcsrtombs optimizations

2018-11-17 Thread Tomas Vondra
Add valgrind suppressions for wcsrtombs optimizations wcsrtombs (called through wchar2char from common functions like lower, upper, etc.) uses various optimizations that may look like access to uninitialized data, triggering valgrind reports. For example AVX2 instructions load data in 256-bit chu

pgsql: Add valgrind suppressions for wcsrtombs optimizations

2018-11-17 Thread Tomas Vondra
Add valgrind suppressions for wcsrtombs optimizations wcsrtombs (called through wchar2char from common functions like lower, upper, etc.) uses various optimizations that may look like access to uninitialized data, triggering valgrind reports. For example AVX2 instructions load data in 256-bit chu

pgsql: Add valgrind suppressions for wcsrtombs optimizations

2018-11-17 Thread Tomas Vondra
Add valgrind suppressions for wcsrtombs optimizations wcsrtombs (called through wchar2char from common functions like lower, upper, etc.) uses various optimizations that may look like access to uninitialized data, triggering valgrind reports. For example AVX2 instructions load data in 256-bit chu

pgsql: Add valgrind suppressions for wcsrtombs optimizations

2018-11-17 Thread Tomas Vondra
Add valgrind suppressions for wcsrtombs optimizations wcsrtombs (called through wchar2char from common functions like lower, upper, etc.) uses various optimizations that may look like access to uninitialized data, triggering valgrind reports. For example AVX2 instructions load data in 256-bit chu

pgsql: Add valgrind suppressions for wcsrtombs optimizations

2018-11-17 Thread Tomas Vondra
Add valgrind suppressions for wcsrtombs optimizations wcsrtombs (called through wchar2char from common functions like lower, upper, etc.) uses various optimizations that may look like access to uninitialized data, triggering valgrind reports. For example AVX2 instructions load data in 256-bit chu

pgsql: Add valgrind suppressions for wcsrtombs optimizations

2018-11-17 Thread Tomas Vondra
Add valgrind suppressions for wcsrtombs optimizations wcsrtombs (called through wchar2char from common functions like lower, upper, etc.) uses various optimizations that may look like access to uninitialized data, triggering valgrind reports. For example AVX2 instructions load data in 256-bit chu

pgsql: Fix AC_REQUIRES breakage in LLVM autoconf tests.

2018-11-17 Thread Tom Lane
Fix AC_REQUIRES breakage in LLVM autoconf tests. Any Autoconf macro that uses AC_REQUIRES -- directly or indirectly -- must not be inside a plain shell "if" test; if it is, whatever code gets pulled in by the AC_REQUIRES will also be inside that "if". Instead of "if" we can use AS_IF, which knows

pgsql: Fix AC_REQUIRES breakage in LLVM autoconf tests.

2018-11-17 Thread Tom Lane
Fix AC_REQUIRES breakage in LLVM autoconf tests. Any Autoconf macro that uses AC_REQUIRES -- directly or indirectly -- must not be inside a plain shell "if" test; if it is, whatever code gets pulled in by the AC_REQUIRES will also be inside that "if". Instead of "if" we can use AS_IF, which knows