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 1ncWIq-0006Rg-CN for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Apr 2022 17:52:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ncWIp-0007vL-2A for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Apr 2022 17:52:15 +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 1ncWIo-0007vC-P4 for pgsql-hackers@lists.postgresql.org; Thu, 07 Apr 2022 17:52:14 +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 1ncWIm-00014J-Bv for pgsql-hackers@lists.postgresql.org; Thu, 07 Apr 2022 17:52:13 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id BCEF35C0152; Thu, 7 Apr 2022 13:52:11 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 07 Apr 2022 13:52:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; bh=trmBe6QFD8HKBFnxZh1yhK5gN8aB+fPllAL+D8 KC5Dw=; b=CNhld8LjA53NJv7nApL3r1nSuMQYSCW+osh94Q/lMG7Va+o2wxXAI+ arzya2L/lHDrgfH+EUukMYsvwXY12unpLkp9l+xCfH8dOL48M1p2A37cnl4LOyCT o0P3+Qzbc/69s04/Odh5frDuNhMoXNHFeYY6dS3/RH39/VO1ZKilNwH6CntOqQTF H2o2QB6dTz8vj7kK0s8pYdWCPIVXkECfBvrhnQ4yDnBR33BO3DTVJp57uDO4DiV4 gzrKVJvoygGmua2CTP28njmpNGig/ZIjYrzlP08Suly2DboSeanmBjlE4V7+Y512 dc7rBer/WfE/SsnNKObnsEyHJpBXsAwg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=trmBe6QFD8HKBFnxZ h1yhK5gN8aB+fPllAL+D8KC5Dw=; b=mJFiEjdkMWaMk9ZRnbc7hCwIqx3aL+fSR MKD29avGcDUdEf9x7qvL53ce78p6niBPCtBo8tUQwrBhYXvj8NtOm293mUZQKOFP ceukCNsQqyKD/nZNuHOgrsHmDhjp+BgRv2X9ZtDyMcO2U9nfOxQoCufLCfjfyKcm 4UCwTDSLU923TwgGrz2Pl2RBMbaZFZce3n35F3ti9oFmN0ywZ1xJTb3ccaCfEMtw lWsj7F5nwiE+lzf8qSeQi943RX9eW30o2us77ZUBE56jFbH0Km/bhzlokpGOdTrR v1w48g9iBy0/4IyV/nKJMR0LjXGLYosnqulEN5GecOrZJL6iz0r3g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudejkedguddvtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculdefhedmnecujfgurhepfffhvffukfhfgggtuggjsehttdertddt tddvnecuhfhrohhmpeetnhgurhgvshcuhfhrvghunhguuceorghnughrvghssegrnhgrrh griigvlhdruggvqeenucggtffrrghtthgvrhhnpedukefhkeelueegveetheelffffjeeg leeuudelfeefuedtleffueejfffhueffudenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 7 Apr 2022 13:52:11 -0400 (EDT) Date: Thu, 7 Apr 2022 10:52:10 -0700 From: Andres Freund To: Tom Lane Cc: Michael Paquier , pgsql-hackers@lists.postgresql.org Subject: Re: pgsql: Add TAP test for archive_cleanup_command and recovery_end_comman Message-ID: <20220407175210.q44nnrvkovprxo2a@alap3.anarazel.de> References: <3385143.1649353230@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3385143.1649353230@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2022-04-07 13:40:30 -0400, Tom Lane wrote: > Michael Paquier writes: > > Add TAP test for archive_cleanup_command and recovery_end_command > > grassquit just showed a non-reproducible failure in this test [1]: I was just staring at that as well. > # Postmaster PID for node "standby" is 291160 > ok 1 - check content from archives > not ok 2 - archive_cleanup_command executed on checkpoint > > # Failed test 'archive_cleanup_command executed on checkpoint' > # at t/002_archiving.pl line 74. > > This test is sending a CHECKPOINT command to the standby and > expecting it to run the archive_cleanup_command, but it looks > like the standby did not actually run any checkpoint: > > 2022-04-07 16:11:33.060 UTC [291806][not initialized][:0] LOG: connection received: host=[local] > 2022-04-07 16:11:33.078 UTC [291806][client backend][2/15:0] LOG: connection authorized: user=bf database=postgres application_name=002_archiving.pl > 2022-04-07 16:11:33.084 UTC [291806][client backend][2/16:0] LOG: statement: CHECKPOINT > 2022-04-07 16:11:33.092 UTC [291806][client backend][:0] LOG: disconnection: session time: 0:00:00.032 user=bf database=postgres host=[local] > > I am suspicious that the reason is that ProcessUtility does not > ask for a forced checkpoint when in recovery: > > RequestCheckpoint(CHECKPOINT_IMMEDIATE | CHECKPOINT_WAIT | > (RecoveryInProgress() ? 0 : CHECKPOINT_FORCE)); > > The trouble with this theory is that this test has been there for > nearly six months and this is the first such failure (I scraped the > buildfarm logs to be sure). Seems like failures should be a lot > more common than that. > I wondered if the recent pg_stats changes could have affected this, but I > don't really see how. I don't really see either. It's a bit more conceivable that the recovery prefetching changes could affect the timing sufficiently? It's also possible that it requires an animal of a certain speed to happen - we didn't have an -fsanitize=address animal until recently. I guess we'll have to wait and see what the frequency of the problem is? Greetings, Andres Freund