Modify pg_stat_get_activity to build a tuplestore

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Adam Brightwell <adam(dot)brightwell(at)crunchydatasolutions(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Modify pg_stat_get_activity to build a tuplestore
Date: 2015-05-07 21:45:12
Message-ID: 20150507214512.GF30322@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

All,

* Robert Haas (robertmhaas(at)gmail(dot)com) wrote (on the role attributes
* thread):
> I think this patch is too big and does too many things. It should be
> broken up into small patches which can be discussed and validated
> independently. The fact that your commit message is incredibly long
> is a sign that there's too much going on here, and that message
> doesn't even cover all of it.

As I mentioned on another thread, you're certainly right about that, and
here's the first broken-out patch, which just changes
pg_stat_get_activity to build and return a tuplestore in a single
function call instead of using the old-style multiple-invokation call
method. Given the simplicity and the lack of any user-visible change,
and that it's an independently useful change regardless of what happens
with the other changes, I'm planning to move forward with this pretty
quickly, barring concerns, of course.

This is heavily based on the pg_stat_get_wal_senders() implementation,
hat-tip to Itagaki Takahiro for that.

Thanks!

Stephen

Attachment Content-Type Size
pg_stat_get_activity_tuplestore_v1.patch text/x-diff 7.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sawada Masahiko 2015-05-07 22:55:24 Re: Proposal : REINDEX xxx VERBOSE
Previous Message Peter Geoghegan 2015-05-07 21:22:08 Re: INSERT ... ON CONFLICT error messages