Re: [HACKERS] keeping track of connections - Mailing list pgsql-hackers

From dg@illustra.com (David Gould)
Subject Re: [HACKERS] keeping track of connections
Date
Msg-id 9806060514.AA06225@hawk.illustra.com
Whole thread Raw
In response to Re: [HACKERS] keeping track of connections  (The Hermit Hacker <scrappy@hub.org>)
List pgsql-hackers
> On Thu, 4 Jun 1998, David Gould wrote:
>
> > Oh, ok. Some suggestions have been made the the postmaster would open a
> > connection to it's own backend to do queries. I was responding to this.
> > I agree that we should just store the information in shared memory.
>
>     How does one get a history for long term monitoring and statistics
> by storing in shared memory?
>
> Marc G. Fournier
> Systems Administrator @ hub.org
> primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org

My thought was a circular event buffer which could provide short term
history. If someone wanted to store long term history (most sites probably
won't, but I agree it can be useful), they would have an application which
queried the short term history and saved it to what ever long term history
they wanted. Eg:

FOREVER {
   sleep(1);
   insert into long_term_hist values
      (select * from pg_eventlog where event_num > highest_seen_so_far);
}

Obviously some details need to be worked out to make sure no history is
ever lost (if that is important). But the basic mechanism is general and
useful for many purposes.

-dg

David Gould           dg@illustra.com            510.628.3783 or 510.305.9468
Informix Software                      300 Lakeside Drive   Oakland, CA 94612
 - A child of five could understand this!  Fetch me a child of five.

pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] keeping track of connections
Next
From: Vadim Mikheev
Date:
Subject: Re: [HACKERS] keeping track of connections