pgsql: Fix thinko when bumping on temporary directories in pg_verify_ch

2019-03-13 Thread Michael Paquier
Fix thinko when bumping on temporary directories in pg_verify_checksums This fixes an oversight from 5c99513. This has no actual consequence as PG_TEMP_FILE_PREFIX and PG_TEMP_FILES_DIR have the same value so when bumping on a temporary path the directory scan was still moving on to the next entr

pgsql: Fix thinko when bumping on temporary directories in pg_checksums

2019-03-13 Thread Michael Paquier
Fix thinko when bumping on temporary directories in pg_checksums This fixes an oversight from 5c99513. This has no actual consequence as PG_TEMP_FILE_PREFIX and PG_TEMP_FILES_DIR have the same value so when bumping on a temporary path the directory scan was still moving on to the next entry inste

pgsql: Sync commentary in transam.h and bki.sgml.

2019-03-13 Thread Tom Lane
Sync commentary in transam.h and bki.sgml. Commit a6417078c missed updating some comments in transam.h about reservation of high OIDs for development purposes. Also tamp down an over-optimistic comment there about how easy it'd be to change FirstNormalObjectId. Earlier, commit 09568ec3d failed t

Re: pgsql: Use condition variables to wait for checkpoints.

2019-03-13 Thread Michael Paquier
On Thu, Mar 14, 2019 at 09:33:42AM +0900, Michael Paquier wrote: > Oops, sorry. I was monitoring the buildfarm yesterday and did not > notice any failures. The attached should fix the problem. Does that > look fine? loach has just turned red again, so I have committed this fix to cool it down.

pgsql: Fix race condition in recently-added TAP test for recovery consi

2019-03-13 Thread Michael Paquier
Fix race condition in recently-added TAP test for recovery consistency A couple of queries are run on the primary to create and fill in a test table, which gets checked on the standby afterwards. However the test was not waiting for the confirmation that the necessary records have been replayed o

pgsql: Adjust the tests for the hyperbolic functions.

2019-03-13 Thread Tom Lane
Adjust the tests for the hyperbolic functions. Preliminary results from the buildfarm suggest that no platform gets commit c6f153dcf's test cases wrong by more than one or two units in the last place, so setting extra_float_digits = 0 should be plenty to hide the cross-platform variations. Also,

Re: pgsql: Use condition variables to wait for checkpoints.

2019-03-13 Thread Michael Paquier
On Wed, Mar 13, 2019 at 07:25:37PM -0400, Tom Lane wrote: > and if you look at the test script, there is no sort of wait for the > creation of "test1" to propagate to the slave before we try to query > it on the slave. We'd have seen this fall over soon enough with or > without your commit. Oops,

Re: pgsql: Use condition variables to wait for checkpoints.

2019-03-13 Thread Tom Lane
Thomas Munro writes: > On Thu, Mar 14, 2019 at 11:02 AM Thomas Munro wrote: >> Use condition variables to wait for checkpoints. > BF animal "loach" is blaming a recoveryCheck failure in > 016_min_conistency on this commit. I wonder if there some timing > dependency in that new test that broke w

Re: pgsql: Use condition variables to wait for checkpoints.

2019-03-13 Thread Thomas Munro
On Thu, Mar 14, 2019 at 11:02 AM Thomas Munro wrote: > Use condition variables to wait for checkpoints. BF animal "loach" is blaming a recoveryCheck failure in 016_min_conistency on this commit. I wonder if there some timing dependency in that new test that broke when CHECKPOINT became faster.

pgsql: Rethink how to test the hyperbolic functions.

2019-03-13 Thread Tom Lane
Rethink how to test the hyperbolic functions. The initial commit tried to test them on trivial cases such as 0, reasoning that we shouldn't hit any portability issues that way. The buildfarm immediately proved that hope ill-founded, and anyway it's not a great testing scheme because it doesn't pro

pgsql: Use condition variables to wait for checkpoints.

2019-03-13 Thread Thomas Munro
Use condition variables to wait for checkpoints. Previously we used a polling/sleeping loop to wait for checkpoints to begin and end, which leads to up to a couple hundred milliseconds of needless thumb-twiddling. Use condition variables instead. Author: Thomas Munro Reviewed-by: Andres Freund D

pgsql: Revert setting client_min_messages to 'debug1' in new tests.

2019-03-13 Thread Robert Haas
Revert setting client_min_messages to 'debug1' in new tests. The buildfarm doesn't like this, because some buildfarm members have log_statement = 'all'. We could change the log level of the messages instead, but Tom doesn't like that. So let's do this instead, at least for now. Patch by Sergei

pgsql: Include all columns in default names for foreign key constraints

2019-03-13 Thread Peter Eisentraut
Include all columns in default names for foreign key constraints When creating a name for a foreign key constraint when none is specified, use all column names instead of only the first one, similar to how it is already done for index names. Author: Paul Martinez Reviewed-by: Peter Eisentraut D

pgsql: Allow ALTER TABLE .. SET NOT NULL to skip provably unnecessary s

2019-03-13 Thread Robert Haas
Allow ALTER TABLE .. SET NOT NULL to skip provably unnecessary scans. If existing CHECK or NOT NULL constraints preclude the presence of nulls, we need not look to see whether any are present. Sergei Kornilov, reviewed by Stephen Frost, Ildar Musin, David Rowley, and by me. Discussion: http://po

pgsql: Remove extra comma

2019-03-13 Thread Magnus Hagander
Remove extra comma Author: Christoph Berg Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/95fa9f1a137fcb55ed418d8c91a315c7bb169979 Modified Files -- doc/src/sgml/pageinspect.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Remove extra comma

2019-03-13 Thread Magnus Hagander
Remove extra comma Author: Christoph Berg Branch -- REL_11_STABLE Details --- https://git.postgresql.org/pg/commitdiff/cbfbf2930e9ca534728ad1aef0f96a052a87dd1d Modified Files -- doc/src/sgml/pageinspect.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Remove extra comma

2019-03-13 Thread Magnus Hagander
Remove extra comma Author: Christoph Berg Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commitdiff/0ca982a6d7489cea81909b672f96b947a3862cbc Modified Files -- doc/src/sgml/pageinspect.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Remove extra comma

2019-03-13 Thread Magnus Hagander
Remove extra comma Author: Christoph Berg Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff/e2e441c763a1d2408cff2501ae96971cc41f5c3f Modified Files -- doc/src/sgml/pageinspect.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)