Re: contrib/pg_stat_statements 1212

From: "Alex Hunsaker" <badalex(at)gmail(dot)com>
To: "ITAGAKI Takahiro" <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: contrib/pg_stat_statements 1212
Date: 2008-12-22 05:37:50
Message-ID: 34d269d40812212137p48117b0v5a8b6824791630c9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 12, 2008 at 02:51, ITAGAKI Takahiro
<itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> wrote:
> Here is an updated version of pg_stat_statements.

I took the liberty of splitting this out into 3 patches for easier review:

patch: 001-hooks.patch
-adds 2 new hooks (startup_hook and shutdown_hook).
-fixes missing process_shared_preload_libraries on EXEC_BACKEND
-changes int pgstat_track_activity_query_size to PGDLLIMPORT int
pgstat_track_activity_query_size
-addes sourceText to QueyDesc and modifies callers to populate it

patch: 002-explain-fmt.patch
-adds new guc explain_analyze_format to print out statistic counters
-adds rtime/utime to explain analyze printout
-moves statistic counters (ReadBufferCount etc...) into struct
Instrumentation via a new struct BufferCounter (allows modules like
the proposed easy access)

patch: pg_stat_statements-1212.patch
the contrib module

A few comments:

Is there a reason you add sourceText to QueryDesc? AFAICT you can do
ActivePortal->sourceText and it will always be populated correctly.

I think the explain_analyze_format guc is a clever way of getting
around the explain analyze verbose you proposed earlier. But I dont
see any doc updates for it.

Im still not overly fond of the "statistics." custom guc name, but
what can you do...

Other than that it looks good, though I admit I have not had the time
to sit down and thoroughly test it yet...

Attachment Content-Type Size
001-hooks.patch text/x-patch 15.4 KB
002-explain-fmt.patch text/x-patch 19.2 KB
pg_stat_statements-1212.patch text/x-patch 32.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zdenek Kotala 2008-12-22 07:43:32 Re: reloptions and toast tables
Previous Message Hitoshi Harada 2008-12-22 04:57:42 Re: Is "Window" really safe as a global typedef name?