Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lrroq-0005yv-A4 for pgsql-bugs@arkaria.postgresql.org; Sat, 12 Jun 2021 00:48:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lrrop-0002xS-Ac for pgsql-bugs@arkaria.postgresql.org; Sat, 12 Jun 2021 00:48:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lrrop-0002xK-3U for pgsql-bugs@lists.postgresql.org; Sat, 12 Jun 2021 00:48:11 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lrroi-0006l2-UU for pgsql-bugs@lists.postgresql.org; Sat, 12 Jun 2021 00:48:10 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id D2EA45C004E; Fri, 11 Jun 2021 20:48:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 11 Jun 2021 20:48:03 -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=fm2; bh=wQ7hAAb5DSzcOFa9aZhWf3Qw+f1 X6zYGmpwdf3g8jkM=; b=eONhCiPswz+6rwbKoXp2m4hi8CPhekziJ9ZgEC5Ozwy WoVYhpXXn3R9BHd34BY+wLpGqWV2JiQURxrLOKwW4hnueAIWfIntVup3YOv/1BCo /JXa9dkye7rLIzbnP4GT0dgKT0wJaH+DZNmyePsMODRhsIiA6ekgwLgu6GXV/Eot hQMUuHB8wg8Ia4JT0LrJ0gYpEEjnaH9e2n0FNW34j/KMs860Wzg5s8SlF5wNSUpW R1mCY/6GAn754r97eIPOyn0aZizpwaq57gdWdcjcpoo9OsGhTu9uFZmlLP8aPINv pFOUJluugqdhEfbHqp6GxHgD8UYVooZADt7AEzG3V7A== 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=fm3; bh=wQ7hAA b5DSzcOFa9aZhWf3Qw+f1X6zYGmpwdf3g8jkM=; b=EttZx8WwLGkCw6ZcPAcvT8 M4IDEaCNc2O+njSmBr2L2EtQgwW8ng7qPLaPvSn6vVzxRlEtMDdP0Zf+N6Az3UxW ZrzqIvqJRwIh/Gsi2VpPkwdlVf+kJZmhEYR4uil94QxCGW9DuTEtk3rLEODp2zFs GdXc3EChveSPRH2TkzsZu06fptOAcBwsZ+Jm8c/PejFRKRtoDocqG4eBFOaGzD+w 72fPy7as2PXXM9ls+3Ql2+JtPzPnaGUyKy8mamkRxN+OlB47XtxuxXeQnNIaHPCl h2sZ/AmMbcbZdrqxQ8hM9Pp6BVE29uYLq21STE6Kfr3r/GLYVilIGJ1ttug/lLCQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeduledgfedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpedvgeduuefhtdeuleettdevjeeh heeiveeuieegleetgeeljeelieeuieehgeevhfenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 11 Jun 2021 20:48:01 -0400 (EDT) Date: Sat, 12 Jun 2021 09:47:55 +0900 From: Michael Paquier To: Tom Lane Cc: Amit Langote , sbernikov@gmail.com, PostgreSQL mailing lists Subject: Re: BUG #17055: Logical replication worker crashes when applying update of row that dose not exist in target partiti Message-ID: References: <17055-9ba800ec8522668b@postgresql.org> <1828113.1623370641@sss.pgh.pa.us> <1881335.1623423667@sss.pgh.pa.us> <2058966.1623442520@sss.pgh.pa.us> <2136546.1623457890@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="J8JGK+iJY2nwbqvc" Content-Disposition: inline In-Reply-To: <2136546.1623457890@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --J8JGK+iJY2nwbqvc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 11, 2021 at 08:31:30PM -0400, Tom Lane wrote: > Michael Paquier writes: > AFAICS, none of the other callers of sub reload are doing anything > special to wait for it to take effect. Not sure why this one > would need more protection. If we do need a fix for that, likely > sub reload itself had better do it. Perhaps. >> +my $logfile =3D slurp_file($node_subscriber->logfile()); >> +ok( $logfile =3D~ >> + qr/logical replication did not find row to be updated in replicati= on target relation "tab_full_pk"/, >> + 'update target row is missing'); >> I think that it would be better here to grab the log location before >> running the queries that will be matched with the logs, then pass down >> the location to slurp_file(). >=20 > This coding is also stolen verbatim from other test scripts. > What is your concern about it exactly? My main concern are future changes in this test suite that could cause more queries to generate logs that overlap with this sequence of tests, falsifying what this test is checking. > It's not like the > tests have such varying amounts of log output that an unexpected > log rotation would be likely. (Does the default TAP setup even > allow log rotation at all? I doubt it.) The default TAP configuration does not use log rotation, because it causes complications in the test code as it makes necessary wait phases to make sure that the logs have rotated. That's also more costly than just getting the log position, run the queries and slurp()'ing the file from the previous position. -- Michael --J8JGK+iJY2nwbqvc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmDEBDsACgkQnvQgOdby QH1/vBAAklTmOUdJAp6XnmIl0038Z9qgTecLbKhEmzcLfZYhEyZntsdFBIy/Sc+p n5soO1I8cT9M1OVAFiC2dT+t/LaLua0gQG2ZM4sTuM4vhggouiY6KhyEhFWb4sk0 l51qh8wOw1/cGAYBFhNmMylJlrTzIyIVxGmP6Rvg8kPJD4yAwUN3zBc1ZoAwybLJ h71x6qDmSvyz3a8/9Wf8JcIYYq5dMsnVIgegJ6Pwd3dTKLqW8g6b/igrEqXgwRTg 3PSi/yxv7uT/V/wzUF8kF4h1eZhk41A86eSHM4tbzhva+ip36kwojFGKJ1fc7NGZ LIY6ezJGGeMvFO2XToaYdI9dxzi9YkBAt3RSIx/ybpys0tpMOXh7MLudICEzIahI 2Z/ZpQbTeOydo59WL9Dqh2H7DcswJKMr7J9HWsDy/0PzxdPKNi8vAb325u+Np3ab rMNTxTPF4c8fhi69LtR+DEzM6xKexOoTdkuaqeHIrN4AmL6H5JuYPENBdMvL/dVf UsHNMLnFLRTqIauxrPwQZo6Umaudvxf8KiYvlbUta5DbkLAuMM8vUpXJ98/+JUPe xMf4mdEw5SAbqAujSRDxrQbdje7jlKLofMgomniO+Dq6hRxfb7uetMrZlw9wX4k9 i0j/zsl/YIrFScAgfMmQTB3m6MA4WVTDyLBw48oyxfp4uoiewmg= =ePIZ -----END PGP SIGNATURE----- --J8JGK+iJY2nwbqvc--