public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tomas Vondra <[email protected]>
To: Gayatri Singh <[email protected]>
To: [email protected]
Subject: Re: Identify transactions causing highest wal generation
Date: Fri, 8 Mar 2024 16:40:39 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CABDbDcbgo8dz73fsjt5JFc19BLR2h9JNwou7KxWwKEpJc0hAAw@mail.gmail.com>
References: <CABDbDcbgo8dz73fsjt5JFc19BLR2h9JNwou7KxWwKEpJc0hAAw@mail.gmail.com>

On 3/8/24 15:50, Gayatri Singh wrote:
> Hello Team,
> 
> Can you help me with steps to identify transactions which caused wal
> generation to surge ?
> 

You should probably take a look at pg_waldump, which prints information
about WAL contents, including which XID generated each record.

I don't know what exactly is your goal, but sometimes it's not entirely
direct relationship. For example, a transaction may delete a record,
which generates just a little bit of WAL. But then after a checkpoint a
VACUUM comes around, vacuums the page to reclaim the space of the entry,
and ends up writing FPI (which is much larger). You could argue this WAL
is also attributable to the original transaction, but that's not what
pg_waldump will allow you to do. FPIs in general may inflate the numbers
unpredictably, and it's not something the original transaction can
affect very much.

regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company






view thread (5+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Identify transactions causing highest wal generation
  In-Reply-To: <[email protected]>

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

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