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 1nNAkA-00029N-9b for pgsql-hackers@arkaria.postgresql.org; Thu, 24 Feb 2022 09:49:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nNAk9-0008CF-6T for pgsql-hackers@arkaria.postgresql.org; Thu, 24 Feb 2022 09:49:01 +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 1nNAk8-0008C5-Sr for pgsql-hackers@lists.postgresql.org; Thu, 24 Feb 2022 09:49:00 +0000 Received: from [66.111.4.28] (helo=out4-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nNAk3-0007GA-St for pgsql-hackers@postgresql.org; Thu, 24 Feb 2022 09:49:00 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 74EDB5C0B32; Thu, 24 Feb 2022 04:48:44 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 24 Feb 2022 04:48:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=6fbiBxzkYuclrFENfP2s4789QXRWRowZowDVRAC70 4k=; b=Ex6/wiZv+1Pwo1Rw2Ye4sn1aNUuQtjL3AtHNHUpdFj4B7zS5Gyi3gBQhe MufsHsDfl89/BSm0dk3lHuve9WOKg6goMmLTreNyIjhR1zwufOTluUxe4xP6wf7t wMHnDq0nMg6/fTHS6NnGaf4gwbynBzoM1HC52vNJeSDONzJsLjA6C+1dMGKI3W/O 0J8W9YH35HdbeUoXcKjPvXAvvyBk0xWMZyC9/E/tvfj/OfFBjzaI4Z5UdVQjMPEg YQpU0GXfvVaKgDe3yjJ5EscAA/iOu2ltwO6A85P2xW5FZ6xc9cST2WCdB8XAI1QC M8T2C5ewGMe2FkfWIQIhO4SkcF2yw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrledvgddtkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvghtvghr ucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnthgvrh hprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeefjeegheetuefhveevudel ueeftdejteeiffetvdduhfdtieefgfeutedtveeggfenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghuthes vghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 24 Feb 2022 04:48:43 -0500 (EST) Message-ID: Date: Thu, 24 Feb 2022 10:48:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Subject: Re: Design of pg_stat_subscription_workers vs pgstats Content-Language: en-US To: Andres Freund , Masahiko Sawada Cc: Amit Kapila , "David G. Johnston" , pgsql-hackers References: <20220218203255.d3evl6qi2n6gxy6b@alap3.anarazel.de> <20220219160203.y5w2ktc2utthn7pe@alap3.anarazel.de> <20220221053453.lo6fzmji23ennvgj@alap3.anarazel.de> <20220221074806.nyhdberpuwbcbudp@alap3.anarazel.de> <20220223021415.ynybxeroefw4kiwh@alap3.anarazel.de> From: Peter Eisentraut In-Reply-To: <20220223021415.ynybxeroefw4kiwh@alap3.anarazel.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.28 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 23.02.22 03:14, Andres Freund wrote: > Why are the stats stored in the per-database stats file / as a second level > below the database? While they're also associated with a database, it's a > global catalog, so it seems to make more sense to have them "live" globally as > well? pg_subscription being a global catalog is a bit of a lie for the benefit of the worker launcher, but it can be treated as a per-database catalog for practical purposes. > Not just from an aesthetical perspective, but there might also be cases where > it's useful to send stats from the stats launcher. E.g. the number of times > the launcher couldn't start a worker because the max numbers of workers was > already active or such. That's a reasonable point, however.