Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h4EJl-0001EG-QM for pgsql-committers@arkaria.postgresql.org; Thu, 14 Mar 2019 00:33:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h4EJk-0005zK-7u for pgsql-committers@arkaria.postgresql.org; Thu, 14 Mar 2019 00:33:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h4EJk-0005wb-0y for pgsql-committers@lists.postgresql.org; Thu, 14 Mar 2019 00:33:52 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h4EJh-0006nD-Ee for pgsql-committers@lists.postgresql.org; Thu, 14 Mar 2019 00:33:51 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 2985421F23; Wed, 13 Mar 2019 20:33:48 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 13 Mar 2019 20:33:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=LLzi9/M41VueqwxrzHt3UZP+ZG1 +NJQ62QQNOBgtLsQ=; b=IDrhGx8en7FF6j5eOfAwAHYmodzm1wOeVgfTOu+x0RV 2CMgjMctr4QjMFIxjtIs9p8GmrCezxbNG6tODaoavr+WYWKnT7X2AcnkN1bi+2l3 elLKwwtgoInIXULPYKsrtzYKGvYAkSJtkfOJIz8t/6nTGBW8yP3WpGfgJ2Wd8H4I dK4/+xnnf7+mECFlZHyUq2UPoOy4eu4uabLWS0smOW6i7L+zoVZsR9zLsHPpDwl5 ScOoR0KLelvHtvhcBr0vIMfAWCILm+g7e2cg0zoBEihxxBVGbkzeAXzig3pUzaCh hTNqpoJ9m7BPHbE9BtMCF2ZUErfLb118gt3/DS+GgZQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=LLzi9/ M41VueqwxrzHt3UZP+ZG1+NJQ62QQNOBgtLsQ=; b=ZeIfFN96CgYLxRsogRgd1R 7PZfRm6itaA09QiLuFvVQq2dJuGxXrobCzecvfbS/OMQAEckAqW5bN0ur1vSYALX UTS31tWWoMWTAmh05XRfUl7OlYIuizrzx7wJUfUJ8ot7FJ/LK9T0jhoQWcWjYvxc uGO8f1QFmNSUmic1TEk3JLyB0JKGd95/73xXq6jxWzc7W1KzKa4J2+kRb+LnDbXS JRHmGqZQIM31j3ZkCoj1IuJzpKLWn7/yzRywalctg4vcQmSb849ZM8XzMlFkkEaI +4oL+DYkOmBoI5wttUWOBMN99qBFIMOUVzCpUjy6V73vc3nh9pso/SMcARyADa3A == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrhedugddvgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecukfhppeeiuddrvdduhedrudefjedrudeivdenucfrrghrrghm pehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiienucevlhhush htvghrufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id A481D100E5; Wed, 13 Mar 2019 20:33:45 -0400 (EDT) Date: Thu, 14 Mar 2019 09:33:42 +0900 From: Michael Paquier To: Tom Lane Cc: Thomas Munro , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Use condition variables to wait for checkpoints. Message-ID: <20190314003342.GD3493@paquier.xyz> References: <24619.1552519537@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="LSp5EJdfMPwZcMS1" Content-Disposition: inline In-Reply-To: <24619.1552519537@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --LSp5EJdfMPwZcMS1 Content-Type: multipart/mixed; boundary="8nsIa27JVQLqB7/C" Content-Disposition: inline --8nsIa27JVQLqB7/C Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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, sorry. I was monitoring the buildfarm yesterday and did not notice any failures. The attached should fix the problem. Does that look fine? -- Michael --8nsIa27JVQLqB7/C Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="recoveryminlsn-tap-fix.patch" Content-Transfer-Encoding: quoted-printable diff --git a/src/test/recovery/t/016_min_consistency.pl b/src/test/recovery= /t/016_min_consistency.pl index 8f1a89c2d3..90a270650d 100644 --- a/src/test/recovery/t/016_min_consistency.pl +++ b/src/test/recovery/t/016_min_consistency.pl @@ -97,6 +97,10 @@ INSERT INTO test1 SELECT generate_series(1, 10000);"); $primary->safe_psql('postgres', 'CHECKPOINT;'); $primary->safe_psql('postgres', 'UPDATE test1 SET a =3D a + 1;'); =20 +# Wait for table creation to happen on the standby. +$primary->wait_for_catchup($standby, 'replay', + $primary->lsn('insert')); + # Fill in the standby's shared buffers with the data filled in # previously. $standby->safe_psql('postgres', 'SELECT count(*) FROM test1;'); --8nsIa27JVQLqB7/C-- --LSp5EJdfMPwZcMS1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlyJoWYACgkQnvQgOdby QH3Lzg//aRAWCPZVWGel5ha6NWvYaiFdIQxOo3ItqM2EQ23cLzy1ZVkgtzFotdJU Pzfay5Z33j0rqHzFjOjZQ18lwR9ek0Kr51hyeaJZ/MRp2/LM8/HHA9slUtnHWSN5 yrm/Gex8IuKBPEMMQO7lhrC4lMBkSr0P6D+IRji5xcKaxMWSGJ4d9Oznws1HjXTZ 4dyuoBZfECFBuJhUmNkXlm4TP4O/6DCWPcp9M8o3N/Q/yec7k0QYZshf0o/jB+GV o7ah2PrvV35DMgtX3s3YI5xzpP+KAAD0UDDwghwbooNweVAwUbOonUTzU7gqpv3A YP7AT2EG6nC9Rr/myu4cSfJ9ysGYGkuDA4k7UO1ZJR3G/Kkassg15AiTrcu2bY83 h9Qv/UmkONyqgPkcwHHy0p4KD/7Q5dyrqiVulF0+gRDwqyF+jhSFCKLeeOUFAWO8 iBF0F52di4gTOFg55IYjUujXgHzZyKrJrZntaX6K6+eDfr/7WXXsSDv8ZzfZm3zT uwTJZ5IHQNGRvEA3ec662abk0f+PtYdHSG8CDaNngytQ3w++wAVBkF8Q9UpOGdo+ D5RIegbFXiR+ucJs53wnWzYsDfN8l5qUmkxgOboifjtW1b/inAcgj7PhGGCViRL0 P5QzvqBe9SuPPDPwv70NMcR8XdftqmswLOatzUShGDP7ivKymVQ= =gntg -----END PGP SIGNATURE----- --LSp5EJdfMPwZcMS1--