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 1oeIPO-0000io-Jp for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Sep 2022 15:58:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oeIPN-0002QO-Fz for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Sep 2022 15:58:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oeIPN-0002QF-6l for pgsql-hackers@lists.postgresql.org; Fri, 30 Sep 2022 15:58:37 +0000 Received: from relay7-d.mail.gandi.net ([217.70.183.200]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oeIPL-0000kq-4O for pgsql-hackers@lists.postgresql.org; Fri, 30 Sep 2022 15:58:36 +0000 Received: (Authenticated sender: vik@postgresfriends.org) by mail.gandi.net (Postfix) with ESMTPSA id 3BC2E20007; Fri, 30 Sep 2022 15:58:31 +0000 (UTC) Message-ID: Date: Fri, 30 Sep 2022 17:58:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: Tracking last scan time Content-Language: en-US To: Dave Page , Andres Freund Cc: Matthias van de Meent , PostgreSQL Developers References: <20220831162108.qyarvx7edqnobiye@awork3.anarazel.de> <20220831185629.mrr2jlwjubsy2pvi@awork3.anarazel.de> <20220901183540.cyfje2lsiouj4qi4@awork3.anarazel.de> <20220906155325.an3xesq5o3fq36gt@awork3.anarazel.de> From: Vik Fearing In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 9/7/22 12:03, Dave Page wrote: > Here's a v4 patch. This reverts to using > GetCurrentTransactionStopTimestamp() for the last_scan times, and will > set xactStopTimestamp the first time GetCurrentTransactionStopTimestamp() > is called, thus avoiding multiple gettimeofday() calls. > SetCurrentTransactionStopTimestamp() is removed, as is use > of xactStopTimestamp (except when resetting it to 0). This patch looks good to me and has much saner behavior than what it replaces. As a matter of process, the oid for the new function should be in the 8000-9000 range and the catversion should be bumped by the committer. Marked as Ready for Committer. Thanks for the patch! -- Vik Fearing