pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mladen Gogala <gogala.mladen@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Transaction Size in PostgreSQL
Date: Tue, 7 Dec 2021 09:12:58 -0500
Message-ID: <181170a8-cf42-9e00-84a8-84944f4d0558@gmail.com> (raw)
In-Reply-To: <CAGH8HiqXBToqe_EVqCxPaV1ZP+vKA9hQDvLEFE-UYRkR+RzwEw@mail.gmail.com>
References: <CAGH8HirGbc_=EU3GYBWQYnofWU2y_ygjP=1gzp-j6wmE3CSMtQ@mail.gmail.com>
	<CAKFQuwajBNigQZ=mU3_hG_-3uNcAzk6j_hPRSH=YDRU_ZKcZUA@mail.gmail.com>
	<CAGH8HiqXBToqe_EVqCxPaV1ZP+vKA9hQDvLEFE-UYRkR+RzwEw@mail.gmail.com>

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






view thread (8+ messages)

Message-ID: <181170a8-cf42-9e00-84a8-84944f4d0558@gmail.com>
Permalink:  ../181170a8-cf42-9e00-84a8-84944f4d0558@gmail.com/
Also on:    postgresql.org/message-id/181170a8-cf42-9e00-84a8-84944f4d0558@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: gogala.mladen@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Transaction Size in PostgreSQL
  In-Reply-To: <181170a8-cf42-9e00-84a8-84944f4d0558@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox