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 1nenld-0003mo-0f for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Apr 2022 00:55:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nenlb-0000Xl-Iy for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Apr 2022 00:55:23 +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 1nenlb-0000Xc-98 for pgsql-hackers@lists.postgresql.org; Thu, 14 Apr 2022 00:55:23 +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 1nenlZ-0005W2-3F for pgsql-hackers@lists.postgresql.org; Thu, 14 Apr 2022 00:55:22 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 7FCC45C01E8; Wed, 13 Apr 2022 20:55:20 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 13 Apr 2022 20:55:20 -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; t=1649897720; x=1649984120; bh=lZUUDtFV1e yFk0ShXusjzU+iReBqen5BILrjj6u3pAA=; b=c4AtInqAGzUYDrmehmtb4ZBe0s A60Tjr03LAMVmy8YWdaMlx7ut/tlOBOecQ0pRQaX6Iqfy0uG3Gs7+TZ/5HIpnzHP 5aq4uv4DFs24eOnPRxOx8N/5GDpKNbPp94H9cMW3w0bQUkRPlfFn+v/5DHhRiw8z HhehznzqbRqh6W9TFx16P2Jtht4aLDDb0+kZNrDBnKGXQYYa3S0jJXdtnqqisNc/ nlRFUHoZSRpzeXKYMXdS+0tjdA4laJSROnNcF6Ykxz6LwP8GpPbihECBjFQ8XIt5 vjKw9ONVz7jPkoQ8tpTgI7ZngMGLihtT+5kYK4WXuMOCnzhqrSiodh3ofUSA== 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=fm1; t=1649897720; x= 1649984120; bh=lZUUDtFV1eyFk0ShXusjzU+iReBqen5BILrjj6u3pAA=; b=B Q5Bsuv5McO8VCmguI4ulnCwZVww2EK5bd1GBtlhJ/CPKuIF0CYT4hKyn9FGamOvf vQthBEyGkkANRWcbX3DGMY1Sz1zbNr/Hagu677I25pbaBOnkohURO5pvaNhH9j1L RtMAFxWBLgIxIikV6F9ZRNiAfv5ODW3pm96xmnjtzAuUwc8SR9qWfdS6OpGc0YUc 2TVhaUKJqZF0ncdi5xP1iPrUC4it9Cl4NoE9fyE0hbF5m95p+CoVYf5F2n+Y1dEb Ow5tC70Wizl5AKJ66AyRfp/FYkqU1b6gSor2pyuW+/w8o862BbZh+TluWMUp0mvS R9z3kDnHoUFUiV7CGnjQQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudelvddggedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrg htthgvrhhnpedukefhkeelueegveetheelffffjeegleeuudelfeefuedtleffueejfffh ueffudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Apr 2022 20:55:20 -0400 (EDT) Date: Wed, 13 Apr 2022 17:55:18 -0700 From: Andres Freund To: "David G. Johnston" Cc: Kyotaro Horiguchi , Melanie Plageman , Justin Pryzby , Thomas Munro , PostgreSQL Hackers Subject: Re: shared-memory based stats collector - v70 Message-ID: <20220414005518.kfnaifc7kro7c6gy@alap3.anarazel.de> References: <20220317073652.kz3uuh6le6vbfod4@alap3.anarazel.de> <20220325.142256.1649716600998659084.horikyota.ntt@gmail.com> <20220325.172418.1055357550509939415.horikyota.ntt@gmail.com> <20220402082102.ojdd2e6cobsmljvh@alap3.anarazel.de> <20220404041516.cctrvpadhuriawlq@alap3.anarazel.de> <20220405030506.lfdhbu5zf4tzdpux@alap3.anarazel.de> <20220406030008.2qxipjxo776dwnqs@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2022-04-13 16:56:45 -0700, David G. Johnston wrote: > On Wed, Apr 13, 2022 at 4:34 PM David G. Johnston < > david.g.johnston@gmail.com> wrote: > Sorry, apparently this "2000-01-01" behavior only manifests after crash > recovery on v15 (didn't check v14); after a clean initdb on v15 I got the > same initdb timestamp. > Feels like we should still report the "end of crash recovery timestamp" for > these instead of 2000-01-01 (which I guess is derived from 0) if we are not > willing to produce null (and it seems other parts of the system using these > stats assumes non-null). Yes, that's definitely not correct. I see the bug (need to call pgstat_reset_after_failure(); in pgstat_discard_stats()). Stupid, but easy to fix - too fried to write a test tonight, but will commit the fix tomorrow. Thanks for catching! Greetings, Andres Freund