Search Postgresql Archives

Re: Autovacuum, dead tuples and bloat

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

 



On 6/26/24 00:03, Shenavai, Manuel wrote:
Thanks for the suggestions.
I checked pg_locks  shows and pg_stat_activity but I could not find a LOCK or an transaction on this (at this point in time).

I assume that this problem may relate to long running transactions which write a lot of data. Is there already something in place that would help me to:
1) identify long running transactions
2) get an idea of the data-volume a single transaction writes?

I tested the log_statement='mod' but this writes too much data (including all payloads). I rather would like to get a summary entry of each transaction like:
"Tx 4752 run for 1hour and 1GB data was written."

https://www.postgresql.org/docs/current/runtime-config-logging.html

log_min_duration_statement

Read the Note below the entry.

This will log long running queries, though it will not show th amount of data written.

If you want to go more in depth there is:

https://www.postgresql.org/docs/current/pgstatstatements.html

It is an extension that you will need to install per instructions at the link.


Is there something like this already available in postgres?

Best regards,
Manuel

--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx






[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 Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux