Re: Identify transactions causing highest wal generation

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: Identify transactions causing highest wal generation
Дата
Msg-id e2734466-50a2-4b7a-91a7-b141e9d16b93@enterprisedb.com
обсуждение исходный текст
Ответ на Identify transactions causing highest wal generation  (Gayatri Singh <gayatripremselvi@gmail.com>)
Ответы Re: Identify transactions causing highest wal generation  ("Euler Taveira" <euler@eulerto.com>)
Re: Identify transactions causing highest wal generation  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers
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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: type cache cleanup improvements
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Confine vacuum skip logic to lazy_scan_skip