pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <robertmhaas@gmail.com>
To: Tatsuhito Kasahara <kasahara.tatsuhito@oss.ntt.co.jp>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: Greg Stark <stark@enterprisedb.com>
Cc: Asko Oja <ascoja@gmail.com>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: decibel <decibel@decibel.org>
Cc: pgsql-hackers@postgresql.org
Subject: Re: display previous query string of idle-in-transaction
Date: Thu, 4 Jun 2009 22:22:41 -0400
Message-ID: <603c8f070906041922u7eaf0f76l8c2b7cbd3049c69b@mail.gmail.com> (raw)
In-Reply-To: <4A287AF3.9000301@oss.ntt.co.jp>
References: <49C9F49B.8020003@oss.ntt.co.jp>
	<1238091273.16568.530.camel@ebony.2ndQuadrant>
	<49CC75E3.7010101@oss.ntt.co.jp>
	<1238139418.16568.555.camel@ebony.2ndQuadrant>
	<A90F3088-EC12-4802-BFC0-BE7BFEBA08F9@decibel.org>
	<ecd779860905122156o48b3d07al75d2d21751c2a5bd@mail.gmail.com>
	<4136ffa0906030724g72a56165s33819f3060002dcb@mail.gmail.com>
	<4A264377.EE98.0025.1@wicourts.gov>
	<4A287AF3.9000301@oss.ntt.co.jp>

On Thu, Jun 4, 2009 at 9:54 PM, Tatsuhito
Kasahara<kasahara.tatsuhito@oss.ntt.co.jp> wrote:
> Kevin Grittner wrote:
>>
>> Greg Stark <stark@enterprisedb.com> wrote:
>>>
>>> Should this patch be on the commitfest page for 8.5? Or is there a
>>> consensus already that it's a bad idea?
>>>
>>> Personally I actually think this makes a lot of sense to do.
>>
>>  +1
>>  It at least gives one a reasonable chance to get a useful clue....
>
> +1
> # And I'm going to register this patch on the next commitfest page.

I don't actually remember seeing actual code to implement this - is
this a patch, or just an idea?  (I guess if this gets added to the
CommitFest page there will be a pointer to the code, but somehow I
can't find it at the moment.)

The only thing I don't like about this is that I think it's kind of a
hack to shove the <IDLE> in transaction designation and the query
string into the same database column.  I've never liked having to
write:

select sum(1) from pg_stat_activity where current_query = '<IDLE> in
transaction';

...and I like it even less if I now have to modify that query to use
"like".  We should find some way to represent this as structured
data...  maybe make a separate column called "idle" that's a boolean,
or something, and let the query column contain the most recent query
(whether or not it's still executing).

...Robert



view thread (4+ messages)

Message-ID: <603c8f070906041922u7eaf0f76l8c2b7cbd3049c69b@mail.gmail.com>
Permalink:  ../603c8f070906041922u7eaf0f76l8c2b7cbd3049c69b@mail.gmail.com/
Also on:    postgresql.org/message-id/603c8f070906041922u7eaf0f76l8c2b7cbd3049c69b@mail.gmail.com

 · 

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: robertmhaas@gmail.com, kasahara.tatsuhito@oss.ntt.co.jp, Kevin.Grittner@wicourts.gov, stark@enterprisedb.com, ascoja@gmail.com, simon@2ndquadrant.com, decibel@decibel.org
  Subject: Re: display previous query string of idle-in-transaction
  In-Reply-To: <603c8f070906041922u7eaf0f76l8c2b7cbd3049c69b@mail.gmail.com>

* 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