Re: Added columns to pg_stat_activity - Mailing list pgsql-patches

From Tom Lane
Subject Re: Added columns to pg_stat_activity
Date
Msg-id 15688.1115605459@sss.pgh.pa.us
Whole thread Raw
In response to Re: Added columns to pg_stat_activity  (Neil Conway <neilc@samurai.com>)
Responses Re: Added columns to pg_stat_activity
List pgsql-patches
Neil Conway <neilc@samurai.com> writes:
> How about changing the statistics collector so that we only include a
> row in the statistics view when we receive the BESTART message?

I'd vote against that.  The mechanism is lossy by design and so we
must design on the assumption that we will sometimes lose the BESTART
message.  I don't think it's acceptable to refuse to display information
we do have (queries, access counts) just because we don't have every
element of a rather-arbitrarily-chosen view row.

> would mean the BESTART message could include backend-start metadata
> (user ID, database ID, client address), and all other messages would
> only need enough header data to identify the backend process they are
> associated with (so perhaps backend id and process id).

Looking at the code, backendid seems sufficient since that is the
lookup key.

            regards, tom lane

pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: Re: Added columns to pg_stat_activity
Next
From: Neil Conway
Date:
Subject: Re: Added columns to pg_stat_activity