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

From Neil Conway
Subject Re: Added columns to pg_stat_activity
Date
Msg-id 427ECC1F.20900@samurai.com
Whole thread Raw
In response to Re: Added columns to pg_stat_activity  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Added columns to pg_stat_activity  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Tom Lane wrote:
> I'd vote against that.  The mechanism is lossy by design

Is it _lossy_, or merely unordered? While UDP doesn't guarantee message
delivery, I wonder what kind of extreme circumstances would need to
exist for you to lose UDP packets outright over the loopback interface.

 > 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.

Is there really any point in returning such incomplete statistics data?
ISTM it would mostly serve to complicate the lives of people writing
automated tools to query statistics data, for example.

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

Not if you want to distinguish between dead and live backends, it's not
(see pgstat_add_backend).

-Neil

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Added columns to pg_stat_activity
Next
From: Tom Lane
Date:
Subject: Re: Added columns to pg_stat_activity