Re: [HACKERS] keeping track of connections

From: dg(at)illustra(dot)com (David Gould)
To: scrappy(at)hub(dot)org (The Hermit Hacker)
Cc: brett(at)work(dot)chicken(dot)org, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] keeping track of connections
Date: 1998-06-06 05:14:20
Message-ID: 9806060514.AA06225@hawk.illustra.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)hub(dot)org secondary: scrappy(at){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(at)illustra(dot)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Vadim Mikheev 1998-06-06 11:43:19 Re: [HACKERS] keeping track of connections
Previous Message The Hermit Hacker 1998-06-06 03:03:18 Re: [HACKERS] keeping track of connections