pgsql: In count_usable_fds(), duplicate stderr not stdin.

2021-09-02 Thread Tom Lane
In count_usable_fds(), duplicate stderr not stdin. We had a complaint that the postmaster fails to start if the invoking program closes stdin. That happens because count_usable_fds expects to be able to dup(0), and if it can't, we conclude there are no free FDs and go belly-up. So far as I can f

pgsql: In count_usable_fds(), duplicate stderr not stdin.

2021-09-02 Thread Tom Lane
In count_usable_fds(), duplicate stderr not stdin. We had a complaint that the postmaster fails to start if the invoking program closes stdin. That happens because count_usable_fds expects to be able to dup(0), and if it can't, we conclude there are no free FDs and go belly-up. So far as I can f

pgsql: Fix float4/float8 hash functions to produce uniform results for

2021-09-02 Thread Tom Lane
Fix float4/float8 hash functions to produce uniform results for NaNs. The IEEE 754 standard allows a wide variety of bit patterns for NaNs, of which at least two ("NaN" and "-NaN") are pretty easy to produce from SQL on most machines. This is problematic because our btree comparison functions dee

pgsql: Fix float4/float8 hash functions to produce uniform results for

2021-09-02 Thread Tom Lane
Fix float4/float8 hash functions to produce uniform results for NaNs. The IEEE 754 standard allows a wide variety of bit patterns for NaNs, of which at least two ("NaN" and "-NaN") are pretty easy to produce from SQL on most machines. This is problematic because our btree comparison functions dee

pgsql: Fix float4/float8 hash functions to produce uniform results for

2021-09-02 Thread Tom Lane
Fix float4/float8 hash functions to produce uniform results for NaNs. The IEEE 754 standard allows a wide variety of bit patterns for NaNs, of which at least two ("NaN" and "-NaN") are pretty easy to produce from SQL on most machines. This is problematic because our btree comparison functions dee

pgsql: Fix float4/float8 hash functions to produce uniform results for

2021-09-02 Thread Tom Lane
Fix float4/float8 hash functions to produce uniform results for NaNs. The IEEE 754 standard allows a wide variety of bit patterns for NaNs, of which at least two ("NaN" and "-NaN") are pretty easy to produce from SQL on most machines. This is problematic because our btree comparison functions dee

pgsql: Fix float4/float8 hash functions to produce uniform results for

2021-09-02 Thread Tom Lane
Fix float4/float8 hash functions to produce uniform results for NaNs. The IEEE 754 standard allows a wide variety of bit patterns for NaNs, of which at least two ("NaN" and "-NaN") are pretty easy to produce from SQL on most machines. This is problematic because our btree comparison functions dee

pgsql: Fix float4/float8 hash functions to produce uniform results for

2021-09-02 Thread Tom Lane
Fix float4/float8 hash functions to produce uniform results for NaNs. The IEEE 754 standard allows a wide variety of bit patterns for NaNs, of which at least two ("NaN" and "-NaN") are pretty easy to produce from SQL on most machines. This is problematic because our btree comparison functions dee

pgsql: Fix float4/float8 hash functions to produce uniform results for

2021-09-02 Thread Tom Lane
Fix float4/float8 hash functions to produce uniform results for NaNs. The IEEE 754 standard allows a wide variety of bit patterns for NaNs, of which at least two ("NaN" and "-NaN") are pretty easy to produce from SQL on most machines. This is problematic because our btree comparison functions dee

pgsql: Remove superfluous variable assignment

2021-09-02 Thread Daniel Gustafsson
Remove superfluous variable assignment Commit a4205fa00 moved setting conn to NULL directly after the call to PQfinish, but the original conn = NULL; remained a few lines down. Fix by removing the superfluous assignment. Author: Bharath Rupireddy Discussion: https://postgr.es/m/calj2acvrinvmdhy