pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Getting previous statements executed a backend currenly in an <idle> in transaction state.
5+ messages / 3 participants
[nested] [flat]

* Getting previous statements executed a backend currenly in an <idle> in transaction state.
@ 2007-01-22 04:25  Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
  0 siblings, 2 replies; 5+ messages in thread

From: Rajesh Kumar Mallah @ 2007-01-22 04:25 UTC (permalink / raw)
  To: pgsql-admin

Dear Friends,

Due to some bug(s) in our apps , in a mod_perl environment
many backend remain in <idle> in transaction state. This
backends sometimes block other statements in batch
processes which in turn blocks access to some production
tables.

This issue has been posted before also but this time i wanted
to know, if it is possible to know what statements have been
executed by the backend in the same transaction which is currently
idle. this can probably help us in identifying the faulty application
code.

in past we had set a logging prefix in guc and used grep to digout
the statements but that was logging all statements which was
probably not a good idea in production environment. Can some
one suggest if anything else is readily available.


regds
mallah.



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Getting previous statements executed a backend currenly in an <idle> in transaction state.
@ 2007-01-22 05:42  Umesh Shastry <ushastry@techbooks.com>
  parent: Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
  1 sibling, 1 reply; 5+ messages in thread

From: Umesh Shastry @ 2007-01-22 05:42 UTC (permalink / raw)
  To: Rajesh Kumar Mallah <mallah.rajesh@gmail.com>; pgsql-admin

This may help you...

http://archives.postgresql.org/pgsql-announce/2006-01/msg00007.php


  ----- Original Message ----- 
  From: Rajesh Kumar Mallah 
  To: Lista Postgres 
  Sent: Monday, January 22, 2007 9:55 AM
  Subject: [ADMIN] Getting previous statements executed a backend currenly in an <idle> in transaction state.


  Dear Friends,

  Due to some bug(s) in our apps , in a mod_perl environment
  many backend remain in <idle> in transaction state. This
  backends sometimes block other statements in batch
  processes which in turn blocks access to some production
  tables.

  This issue has been posted before also but this time i wanted
  to know, if it is possible to know what statements have been
  executed by the backend in the same transaction which is currently
  idle. this can probably help us in identifying the faulty application
  code.

  in past we had set a logging prefix in guc and used grep to digout
  the statements but that was logging all statements which was
  probably not a good idea in production environment. Can some
  one suggest if anything else is readily available.


  regds
  mallah.

  ---------------------------(end of broadcast)---------------------------
  TIP 4: Have you searched our list archives?

                 http://archives.postgresql.org

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Getting previous statements executed a backend currenly in an <idle> in transaction state.
@ 2007-01-22 06:11  Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
  parent: Umesh Shastry <ushastry@techbooks.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Rajesh Kumar Mallah @ 2007-01-22 06:11 UTC (permalink / raw)
  To: Umesh Shastry <ushastry@techbooks.com>; +Cc: pgsql-admin

On 1/22/07, Umesh Shastry <ushastry@techbooks.com> wrote:
>
>
> This may help you...
thanks for reply.
but thats for slow queries. Blocked queries are different
regds
mallah.
>
> http://archives.postgresql.org/pgsql-announce/2006-01/msg00007.php
>
>



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Getting previous statements executed a backend currenly in an <idle> in transaction state.
@ 2007-01-22 06:44  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
  1 sibling, 1 reply; 5+ messages in thread

From: Tom Lane @ 2007-01-22 06:44 UTC (permalink / raw)
  To: Rajesh Kumar Mallah <mallah.rajesh@gmail.com>; +Cc: pgsql-admin

"Rajesh Kumar Mallah" <mallah.rajesh@gmail.com> writes:
> This issue has been posted before also but this time i wanted
> to know, if it is possible to know what statements have been
> executed by the backend in the same transaction which is currently
> idle. this can probably help us in identifying the faulty application
> code.

> in past we had set a logging prefix in guc and used grep to digout
> the statements but that was logging all statements which was
> probably not a good idea in production environment. Can some
> one suggest if anything else is readily available.

AFAICS, log_statement and friends are much cheaper than any other
alternative could be.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Getting previous statements executed a backend currenly in an <idle> in transaction state.
@ 2007-01-22 08:05  Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Rajesh Kumar Mallah @ 2007-01-22 08:05 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin

> AFAICS, log_statement and friends are much cheaper than any other
> alternative could be.

Dear Sir,
thanks for the reply and clarifying.
regds
mallah.
>
>                         regards, tom lane
>



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2007-01-22 08:05 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-01-22 04:25 Getting previous statements executed a backend currenly in an <idle> in transaction state. Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
2007-01-22 05:42 ` Umesh Shastry <ushastry@techbooks.com>
2007-01-22 06:11   ` Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
2007-01-22 06:44 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-01-22 08:05   ` Rajesh Kumar Mallah <mallah.rajesh@gmail.com>

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