Search Postgresql Archives

Re: How to get cursor query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Adrian Klaver <adrian.klaver@xxxxxxxxxxx> writes:
> On 08/18/2015 06:44 AM, Tom Lane wrote:
>> Adrian Klaver <adrian.klaver@xxxxxxxxxxx> writes:
>>> The only thing I can think to do is load pg_stat_statements:
>>> http://www.postgresql.org/docs/9.4/interactive/pgstatstatements.html

>> That won't help after-the-fact either.

> Well at some point the query will leave the view, but by default 
> pg_stat_statements tracks the last 5000 distinct statements, so you have 
> some time > 0 to find it.

No, you don't have any time to find it, because pg_stat_statements can
only track operations in backends that it's already been loaded into.
What's more, it requires shared memory that can only be allocated at
postmaster start, so that there's really no way to load it without a
postmaster restart.

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux