public inbox for [email protected]  
help / color / mirror / Atom feed
From: Drouvot, Bertrand <[email protected]>
To: Greg Stark <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Melanie Plageman <[email protected]>
Cc: Kyotaro Horiguchi <[email protected]>
Cc: Justin Pryzby <[email protected]>
Cc: Thomas Munro <[email protected]>
Cc: David G. Johnston <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: shared-memory based stats collector - v70
Date: Thu, 11 Aug 2022 08:11:23 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAM-w4HP_YL8uPrNiv2DPKmq1KD3QLEX7CBLc5DCJ9j7mf7eerw@mail.gmail.com>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<CAM-w4HN=4ss5dS2DH6Cof=zocJXeGOjRNKxEGgUZdJPMndyNzA@mail.gmail.com>
	<CAAKRu_Z18jYbarKA4GZMOO00KtUqKtBqgQ8SgB=wSvSqKq3iiA@mail.gmail.com>
	<[email protected]>
	<CAM-w4HOxaO6iJ94bGt1A65PRgX_b4gGSmb4mdzakZ1QhvGW=jA@mail.gmail.com>
	<[email protected]>
	<CAM-w4HMhHAxjpXNVMZ5WhULHpd3+LuP27zaSKSFnzZeRwHZTjg@mail.gmail.com>
	<[email protected]>
	<CAM-w4HNqCR7X9q5_wbJi4wLfTT1gLvy5VRS+ZGo6z8-DbXkHpw@mail.gmail.com>
	<[email protected]>
	<CAM-w4HP_YL8uPrNiv2DPKmq1KD3QLEX7CBLc5DCJ9j7mf7eerw@mail.gmail.com>

Hi,

On 8/10/22 11:25 PM, Greg Stark wrote:
> On Wed, 10 Aug 2022 at 04:05, Drouvot, Bertrand <[email protected]> wrote:
>> Hi,
>>
>> On 8/9/22 6:00 PM, Greg Stark wrote:
>>> On Tue, 9 Aug 2022 at 06:19, Drouvot, Bertrand <[email protected]> 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 working on it myself too. I'll post a patch for discussion in a bit.
>> Great! Thank you!
> So I was adding the code to pgstat.c because I had thought there were
> some data types I needed and/or static functions I needed. However you
> and Andres encouraged me to check again now. And indeed I was able,
> after fixing a couple things, to make the code work entirely
> externally.

Nice!

Though I still think to have an SQL API in core could be useful to.

As Andres was not -1 about that idea (as it should be low cost to add 
and maintain) as long as somebody cares enough to write something: then 
I'll give it a try and submit a patch for it.

>
> This is definitely not polished and there's a couple obvious things
> missing. But at the risk of embarrassment I've attached my WIP. Please
> be gentle :) I'll post the github link in a bit when I've fixed up
> some meta info.

Thanks! I will have a look at it on github (once you share the link).

Regards,

-- 
Bertrand Drouvot
Amazon Web Services: https://aws.amazon.com






view thread (82+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: shared-memory based stats collector - v70
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox