public inbox for [email protected]  
help / color / mirror / Atom feed
From: Greg Sabino Mullane <[email protected]>
To: Atul Kumar <[email protected]>
Cc: Ron Johnson <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: No. Of wal files generated
Date: Fri, 7 Mar 2025 22:34:22 -0500
Message-ID: <CAKAnmmK14+Wf_cM9bkySgBDu+i3t_iyhwZGQ6kYK5bHiUBiqmg@mail.gmail.com> (raw)
In-Reply-To: <CA+ONtZ6q4+wcNH9dPZm2tugLaU98xrf7iU8UA6JC2NVYtW_JRw@mail.gmail.com>
References: <CA+ONtZ4q9OkEHx0pCf87Z876=_vM7=+Ko18HF8+WHrENQ8mxLg@mail.gmail.com>
	<CANzqJaB4Qz2iqvaprSHH18=A3neAMBugJ4OLoZr2UZ3rQiUF2A@mail.gmail.com>
	<CA+ONtZ6q4+wcNH9dPZm2tugLaU98xrf7iU8UA6JC2NVYtW_JRw@mail.gmail.com>

Take a look at the pg_stat_archiver view, if you have not already:

https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-ARCHIVER-VIEW

So I want to check how many wal file got created in x minutes and how many
> .ready files got created in those x minutes.
>

It's not clear why you would want to track .ready files, they should be
quite transient, and not a concern unless you are rolling your own
archiving system (which you should not be). But Ron's suggestion of
inotifywait is a good one for this. Probably listed as inotify or
inotify-tools in your packaging system. Basic usage would be something like
this, from the data directory:

timeout 10m inotifywait pg_wal/ -r -m -e close_write -o walinfo.log

Cheers,
Greg

--
Crunchy Data - https://www.crunchydata.com
Enterprise Postgres Software Products & Tech Support


view thread (7+ 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], [email protected]
  Subject: Re: No. Of wal files generated
  In-Reply-To: <CAKAnmmK14+Wf_cM9bkySgBDu+i3t_iyhwZGQ6kYK5bHiUBiqmg@mail.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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox