Re: pgsql: Use condition variables to wait for checkpoints. - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Use condition variables to wait for checkpoints.
Date
Msg-id 24619.1552519537@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Use condition variables to wait for checkpoints.  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: pgsql: Use condition variables to wait for checkpoints.
List pgsql-committers
Thomas Munro <thomas.munro@gmail.com> writes:
> On Thu, Mar 14, 2019 at 11:02 AM Thomas Munro <tmunro@postgresql.org> 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.

Uh, yeah, I'd say it's pretty obvious: the failure is

error running SQL: 'psql:<stdin>:1: ERROR:  relation "test1" does not exist
LINE 1: SELECT count(*) FROM test1;
                             ^'
while running 'psql -XAtq -d port=57404 host=/tmp/8ItZDq6QmQ dbname='postgres' -f - -v ON_ERROR_STOP=1' with sql
'SELECTcount(*) FROM test1;' at
/usr/home/pgbf/buildroot/HEAD/pgsql.build/src/test/recovery/../../../src/test/perl/PostgresNode.pmline 1331. 

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.

            regards, tom lane


pgsql-committers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: pgsql: Use condition variables to wait for checkpoints.
Next
From: Michael Paquier
Date:
Subject: Re: pgsql: Use condition variables to wait for checkpoints.