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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Use condition variables to wait for checkpoints.
Date: 2019-03-13 23:25:37
Message-ID: 24619.1552519537@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:
> On Thu, Mar 14, 2019 at 11:02 AM Thomas Munro <tmunro(at)postgresql(dot)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 'SELECT count(*) FROM test1;' at /usr/home/pgbf/buildroot/HEAD/pgsql.build/src/test/recovery/../../../src/test/perl/PostgresNode.pm line 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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2019-03-14 00:33:42 Re: pgsql: Use condition variables to wait for checkpoints.
Previous Message Thomas Munro 2019-03-13 23:02:24 Re: pgsql: Use condition variables to wait for checkpoints.