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 1oLgHZ-0007Cr-Ei for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Aug 2022 07:37: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 1oLgHX-0003Y1-DN for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Aug 2022 07:37:35 +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 1oLgHW-0003Xq-Ej for pgsql-hackers@lists.postgresql.org; Wed, 10 Aug 2022 07:37:35 +0000 Received: from smtp-fw-80007.amazon.com ([99.78.197.218]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oLgHT-000412-Md for pgsql-hackers@lists.postgresql.org; Wed, 10 Aug 2022 07:37:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1660117052; x=1691653052; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=HQwPo9KnzxuhH2gVSE2Z9BFNmP7MNEnGILCyQnh+IY0=; b=Tq13VurnsNdBIpJOy36raf9/0AYUQlWrCq85ZZx7XlU+uFzQ6m/rP1d1 BIVurMdWAY8rq5eQWPmHl61gquT/Osaxh9TKdfSy0kMoDY5uWzGMxRm5P OUcYIx9XphhCQ6haNa/O7YFaX9a3k01aaJlVCwsO4Or+PFdmKbFaXA1f+ E=; X-IronPort-AV: E=Sophos;i="5.93,226,1654560000"; d="scan'208";a="117633223" Received: from pdx4-co-svc-p1-lb2-vlan3.amazon.com (HELO email-inbound-relay-iad-1d-8bf71a74.us-east-1.amazon.com) ([10.25.36.214]) by smtp-border-fw-80007.pdx80.corp.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Aug 2022 07:37:12 +0000 Received: from EX13D03EUC003.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan3.iad.amazon.com [10.40.163.38]) by email-inbound-relay-iad-1d-8bf71a74.us-east-1.amazon.com (Postfix) with ESMTPS id DFA71C1796; Wed, 10 Aug 2022 07:37:09 +0000 (UTC) Received: from [192.168.10.191] (10.43.162.227) by EX13D03EUC003.ant.amazon.com (10.43.164.192) with Microsoft SMTP Server (TLS) id 15.0.1497.36; Wed, 10 Aug 2022 07:37:05 +0000 Message-ID: <28ff49ef-46f8-0fb3-da67-ea903d3ef7e1@amazon.com> Date: Wed, 10 Aug 2022 09:37:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.1.1 Subject: Re: shared-memory based stats collector - v70 To: Andres Freund CC: Greg Stark , Tom Lane , Melanie Plageman , Kyotaro Horiguchi , Justin Pryzby , Thomas Munro , "David G. Johnston" , PostgreSQL Hackers References: <20220404041516.cctrvpadhuriawlq@alap3.anarazel.de> <20220405030506.lfdhbu5zf4tzdpux@alap3.anarazel.de> <20220406030008.2qxipjxo776dwnqs@alap3.anarazel.de> <1736122.1658333315@sss.pgh.pa.us> <83D73EC0-E3ED-4C98-A528-5E122278D553@anarazel.de> <20220809164046.33vxhj6eeel2q3tq@awork3.anarazel.de> Content-Language: en-US From: "Drouvot, Bertrand" In-Reply-To: <20220809164046.33vxhj6eeel2q3tq@awork3.anarazel.de> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.43.162.227] X-ClientProxiedBy: EX13D46UWC003.ant.amazon.com (10.43.162.119) To EX13D03EUC003.ant.amazon.com (10.43.164.192) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 8/9/22 6:40 PM, Andres Freund wrote: > Hi, > > On 2022-08-09 12:18:47 +0200, Drouvot, Bertrand wrote: >> What do you think about adding a function in core PG to provide such >> functionality? (means being able to retrieve all the stats (+ eventually add >> some filtering) without the need to connect to each database). > I'm not that convinced by the use case, but I think it's also low cost to add > and maintain, so if somebody cares enough to write something... Ack. > > The only thing I would "request" is that such a function requires more > permissions than the default accessors do. I think it's a minor problem that > we allow so much access within a database right now, regardless of object > permissions, but it'd not be a great idea to expand that to other databases, > in bulk? Agree that special attention would need to be pay around permissions. Something like allow its usage if member of pg_read_all_stats? Regards, -- Bertrand Drouvot Amazon Web Services: https://aws.amazon.com