On 12/7/21 00:13, Sivasamy Subramaniam wrote:
> Transaction size meaning, for example - any transaction over 1GB in
> size? I am looking to set up an alert if any massive data changes are
> happening in a single transaction. I can do it for long running
> transactions or query but trying to figure out any easy way to
> calculate the amount of data changes per transaction.
You will have to build such tool into the application. Application will
have to monitor pg_stat_xact_user_tables and send alert if the alert
threshold is exceeded. That will make the application unnecessarily
complex and will also impact the performance. This falls into the "no
can do" category.
--
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com