pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Kellerer <shammat@gmx.net>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Transaction Size in PostgreSQL
Date: Tue, 7 Dec 2021 07:41:13 +0100
Message-ID: <17b19213-1588-dca9-b009-8913b8d1401f@gmx.net> (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>

Sivasamy Subramaniam schrieb am 07.12.2021 um 06:13:
> 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.


A long running transaction doesn't necessary mean it wrote "1GB" of data,
and a transaction that writes 1GB of data isn't necessarily a "long running"
transaction.

"Massive data changes" in a single transaction aren't really a problem.
In my experience a single transaction changing a lot of rows is more
efficient than multiple transactions changing fewer rows.

A long _running_ transaction - even if it only changed one row - is a much
bigger problem though.






view thread (8+ messages)  latest in thread

Message-ID: <17b19213-1588-dca9-b009-8913b8d1401f@gmx.net>
Permalink:  ../17b19213-1588-dca9-b009-8913b8d1401f@gmx.net/
Also on:    postgresql.org/message-id/17b19213-1588-dca9-b009-8913b8d1401f@gmx.net

 · 

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: shammat@gmx.net, pgsql-admin@lists.postgresql.org
  Subject: Re: Transaction Size in PostgreSQL
  In-Reply-To: <17b19213-1588-dca9-b009-8913b8d1401f@gmx.net>

* 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