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 1nM1Lp-0007Ye-FC for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Feb 2022 05:35:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nM1Ln-0002TE-LQ for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Feb 2022 05:35:07 +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 1nM1Ll-0002T0-Qy for pgsql-hackers@lists.postgresql.org; Mon, 21 Feb 2022 05:35:07 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nM1Lg-0003VG-Cj for pgsql-hackers@postgresql.org; Mon, 21 Feb 2022 05:35:04 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 179D13201E09; Mon, 21 Feb 2022 00:34:55 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 21 Feb 2022 00:34:55 -0500 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=fm3; bh=2HT5PrU5/fcN2oUDQ0hWf3ZSJJiOEbaWxYwDii o22L0=; b=kMULkSvdKZrsBOI+UvlD2l2lWRCkq72fjiUxHr9FxgNV9uUVPj5XXl VS1AV+gLXfkDfBzD+bRIcx8s/ZW2t0+0T7guGwhYeNILZLeOw6fsxBvr9ReweIwG KUTV5xZWR5C8+jp9DRbr/6UqEMTvbLnsYHsXDY/qPnYh2UEsOo3c+OEygL5/yoje wKQcHqzf3gNzoMDwVJVliGjO1Sn2hkD53aHPRUHtlPDlhcUSzsEqq9N/EIKaIhKD CvvsGQwEuBTSX5Xee0GRFs8LsyJZmRg5ZAqqYt4VlcqIclhbJ/ISv2VJptwo2MSZ uxyzFN1eX+wprrMG5B2mELcdSOY0DzzQ== 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=fm2; bh=2HT5PrU5/fcN2oUDQ 0hWf3ZSJJiOEbaWxYwDiio22L0=; b=kmkMT0wzCUSqAncCWuaUr+WrmZdFXwOTu 4Z1/5qCHYJDOVIuXp9e6tlsss73eiOXSkcRgVWSfRJhUyfoBg8GNTN4yw30hvaYq 6uo4h7YnUDAY4wnfvpfsFpZ4aI0TzztKxCSSHeKug58fsMIQUYoU+fzlevnKOC8f FxXYXaobbnDqWk1HfGk57bBs3fPtnVfj+hm79P0UBKXzU7kPiizcK4z98j0sW4Yi S10AUsC+51n6LAMaLbEdiJCqRhOP25I41V7iQZ48v+zDSgLgjvvSSmZuPiYC3IMM zbCh7c00hNotNjQgMuqcPVp/8kY6LlCz80NQb1WWjmoGx4ujTs5eA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrkeehgdekvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughrvghs ucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrfgrth htvghrnhepudekhfekleeugeevteehleffffejgeelueduleeffeeutdelffeujeffhfeu ffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 21 Feb 2022 00:34:54 -0500 (EST) Date: Sun, 20 Feb 2022 21:34:53 -0800 From: Andres Freund To: Masahiko Sawada Cc: Amit Kapila , "David G. Johnston" , pgsql-hackers Subject: Re: Design of pg_stat_subscription_workers vs pgstats Message-ID: <20220221053453.lo6fzmji23ennvgj@alap3.anarazel.de> References: <20220215182641.2cejma6tcgeoqyw2@alap3.anarazel.de> <20220218203255.d3evl6qi2n6gxy6b@alap3.anarazel.de> <20220219160203.y5w2ktc2utthn7pe@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-02-21 12:56:46 +0900, Masahiko Sawada wrote: > > The patch you referenced [1] should just store the stats in the > > pg_stat_subscription view, not pg_stat_subscription_workers. > > > > It *does* make sense to keep stats about the number of table syncs that failed > > etc. But that should be a counter in pg_stat_subscription, not a row in > > pg_stat_subscription_workers. > > We have discussed using pg_stat_subscription before but concluded it's > not an appropriate place to store error information because it ends up > keeping cumulative stats mixed with non-cumulative stats. Well, as we've amply discussed, the non-cumulative stats shouldn't be in the pgstat subsystem. > To take a precedent, we used to store accumulative statistics such as > spill_txns to pg_stat_replication, but then for the same reason we moved > those statistics to the new stats view, pg_stat_replication_slot. New > subscription statistics that we're introducing are cumulative statistics > whereas pg_stat_subscription is a dynamic statistics view. I'm happy to have cumulative subscriber stats somewhere in pgstats. But it shouldn't be split by worker or relation, and it shouldn't contain non-cumulative error information. Greetings, Andres Freund