Re: Transaction Size in PostgreSQL

From: Mladen Gogala <gogala(dot)mladen(at)gmail(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Transaction Size in PostgreSQL
Date: 2021-12-07 14:12:58
Message-ID: 181170a8-cf42-9e00-84a8-84944f4d0558@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Mladen Gogala 2021-12-07 14:18:37 Re: Pg_dump
Previous Message David G. Johnston 2021-12-07 13:00:15 Re: Transaction Size in PostgreSQL