Re: find query beening executed

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: Jaume Sabater <jsabater(at)gmail(dot)com>, Julius Tuskenis <julius(at)nsoft(dot)lt>, pgsql-admin(at)postgresql(dot)org
Subject: Re: find query beening executed
Date: 2009-10-22 14:19:53
Message-ID: 29752.1256221193@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> writes:
> Does it give full queries, even if they're long? That would be really
> useful sometimes.

There is no mechanism other than pg_stat_activity for seeing what
another backend is currently doing.

In recent releases you can change track_activity_query_size to set the
cutoff point for truncation of pg_stat_activity's copy of the current
query. This is a straight tradeoff of shared memory space against
capability, and I don't recommend raising the setting to the moon.
But certainly you can make it higher than the default 1K.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message David Jantzen 2009-10-22 16:34:42 Fwd: Reversing flow of WAL shipping
Previous Message Lennin Caro 2009-10-22 14:07:08 Re: cursor problem