pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tatsuhito Kasahara <kasahara.tatsuhito@oss.ntt.co.jp>
To: ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>
Cc: Guillaume Smet <guillaume.smet@gmail.com>
Cc: depesz@depesz.com
Cc: pgsql-hackers@postgresql.org
Subject: Re: display previous query string of idle-in-transaction
Date: Thu, 26 Mar 2009 20:00:09 +0900
Message-ID: <49CB6039.9060306@oss.ntt.co.jp> (raw)
In-Reply-To: <20090326175406.AC8E.52131E4D@oss.ntt.co.jp>
References: <1d4e0c10903251007v500e762bqd3514a0c440b928c@mail.gmail.com>
	<49CB39C7.2000008@oss.ntt.co.jp>
	<20090326175406.AC8E.52131E4D@oss.ntt.co.jp>

ITAGAKI Takahiro wrote:
> The feature could be achieved by an extension module using new executor
> hooks in 8.4. It is just like contrib/pg_stat_statements; 
Well, it is a good idea.

Displaying last-query-string may be useful, but it is not a feature for
general purpose. So, it may be an external module.

Now, I have two choice.

1. Displaying last-query-string by pg_stat_activity (suggested by Gurjeet):
    Extends the pg_stat_activity to display "previous_query".
    We can check only a previous query.

2. Displaying query-string-history by external module (suggested by Itagaki):
    Using executor hook to get a query string and stores it in
    shared memory.
    We can check specified number of query string history.

I think I will try mainly 2.
# Or this feature may merge to pg_stat_statements.
Any comments welcome.

Best regards,
-- 
Tatsuhito Kasahara
kasahara.tatsuhito@oss.ntt.co.jp



view thread (28+ messages)  latest in thread

Message-ID: <49CB6039.9060306@oss.ntt.co.jp>
Permalink:  ../49CB6039.9060306@oss.ntt.co.jp/
Also on:    postgresql.org/message-id/49CB6039.9060306@oss.ntt.co.jp

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: kasahara.tatsuhito@oss.ntt.co.jp, itagaki.takahiro@oss.ntt.co.jp, guillaume.smet@gmail.com, depesz@depesz.com
  Subject: Re: display previous query string of idle-in-transaction
  In-Reply-To: <49CB6039.9060306@oss.ntt.co.jp>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox