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 1nM3Qc-0004Fc-Vd for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Feb 2022 07:48:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nM3Qb-00036B-QU for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Feb 2022 07:48:13 +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 1nM3Qa-000361-OW for pgsql-hackers@lists.postgresql.org; Mon, 21 Feb 2022 07:48:13 +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 1nM3QY-0001C3-11 for pgsql-hackers@postgresql.org; Mon, 21 Feb 2022 07:48:11 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 9A75B5C01AE; Mon, 21 Feb 2022 02:48:08 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 21 Feb 2022 02:48:08 -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=ljTIdvclK5CWahV3e0244j/Rjm8+gs2t8xlumd 8uODU=; b=Rm7KlG85TD4BX3PWvyIJ/4bhPesVc7KdxQyHWp0vbIA5x3qVvsl1Nk kAmo8qoeBkdV1+lqYU43H9DL3k0Bt4NrSWgkJdc6Trp0TJZJpGMbIJFr9NLLAjKV QD/acTFlAaQWiIZBLyo/0T6FundpF4Q2khf8vGhj5SU6DaFUMzUejPp/aHoAy1d5 OLufHWVlzMHFboM/Kl1e6JinzKDUTHhtd/0+fUfNJdVuxeBaizFs5MfunhBA7mss 5/Cqf3Q6MaBLbJlL1XxQGfWAbMUv2FXZma7Y0Rv9jBgc/zDWRS7yEE2aVdLPYwWa hSPUfwoFyti3P4+o2h1pOJgGRHzyocdQ== 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=ljTIdvclK5CWahV3e 0244j/Rjm8+gs2t8xlumd8uODU=; b=MGn65pGSQVMbPH89ybiYfi7mg2U6plduT zmdGwnJWb9uWIH4yWmTOxAiFU6wtP5SejnGEaq7BnXJwmAqJ0uWyPTlwGup29gnC gcwt9N43UxrZLPtglaV57vG2e44nm4tDHfLOMQdEIcdDxyxN0GSZ/AL1WCumZVa5 TyZm71SbE4ZLFD+ziuCWOYIYbDhwTLnAxz0EIIPtAvfGLBrDpW4F8kYWwE2WEtAI qAQPqRN5WYG0xrj1zm05nNK0SV9xZKxgybfyaxLBb9vXTzRVz2pqzhdYICzUJn60 fiK387Pe3qOVe0Sx5x+Oyc0zyxZzE6lbpNwlve0kV/iI8BTooTPPw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrkeehgddutdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrg htthgvrhhnpedukefhkeelueegveetheelffffjeegleeuudelfeefuedtleffueejfffh ueffudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 21 Feb 2022 02:48:08 -0500 (EST) Date: Sun, 20 Feb 2022 23:48:06 -0800 From: Andres Freund To: Amit Kapila Cc: Masahiko Sawada , "David G. Johnston" , pgsql-hackers Subject: Re: Design of pg_stat_subscription_workers vs pgstats Message-ID: <20220221074806.nyhdberpuwbcbudp@alap3.anarazel.de> References: <20220215182641.2cejma6tcgeoqyw2@alap3.anarazel.de> <20220218203255.d3evl6qi2n6gxy6b@alap3.anarazel.de> <20220219160203.y5w2ktc2utthn7pe@alap3.anarazel.de> <20220221053453.lo6fzmji23ennvgj@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:39:31 +0530, Amit Kapila wrote: > Fair enough. Then, how about the following keeping the following information: Mostly sounds good. > * subid (subscription id) > * subname (subscription name) Coming from catalog, via join, I assume? > * sync_error_count/sync_failure_count (number of timed table sync failed) > * apply_error_count/apply_failure_count (number of times apply failed) Yep. > * sync_success_count (number of table syncs successfully finished) This one I'm not quite convinced by. You can't rely on precise counts with pgstats and we should be able to get a better idea from somewhere more permanent which relations succeeded? But it also doesn't do much harm, so ... > * apply_commit_count (number of transactions applied successfully) > * apply_rollback_count (number of transactions explicitly rolled back) What does "explicit" mean here? > * stats_reset (Time at which these statistics were last reset) > > The view name could be pg_stat_subscription_lrep, > pg_stat_logical_replication, or something on those lines. pg_stat_subscription_stats :) (I really dislike that we have pg_stat_ stuff that's not actually stats, but something describing the current state, but that ship has well sailed). Greetings, Andres Freund