Re: Buffer statistics for pg_stat_statements

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org, Cedric Villemain <cedric(dot)villemain(at)dalibo(dot)com>
Subject: Re: Buffer statistics for pg_stat_statements
Date: 2009-12-30 04:26:25
Message-ID: 603c8f070912292026r6deb2843y99b67245bb54a0e1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 22, 2009 at 3:27 AM, Takahiro Itagaki
<itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> wrote:
> Cedric Villemain <cedric(dot)villemain(at)dalibo(dot)com> wrote:
>> Le vendredi 18 decembre 2009 09:44:40, Takahiro Itagaki a ecrit :
>> > I'd like to add per-query buffer usage into contrib/pg_stat_statements.
>
> Here is a patch to add buffer usage columns into pg_stat_statements.
> It also changes initialzation of the result TupleDesc from manually
> coded routines to get_call_result_type().

I have reviewed this patch and I think it looks pretty good. A couple
of minor nits:

- There are needless whitespace changes in the definition of struct
Counters. The changes to the existing four members should be
reverted, and the new members should be made to match the existing
members.

- In the part that reads /* calc differences of buffer counters */,
all the lines go past 80 columns. I wonder if it would be better to
insert a line break just after the equals sign and indent the next
line by an extra tab stop. See, e.g. src/backend/commands/user.c line
338.

Other than that I think this is ready to commit.

...Robert

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-12-30 04:34:25 Re: update_process_title=off and logger, wal, ... processes
Previous Message Robert Haas 2009-12-30 04:11:18 Re: [PATCH 4/4] Add tests to dblink covering use of COPY TO FUNCTION