pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
finding out what's generating WALs
2+ messages / 2 participants
[nested] [flat]

* finding out what's generating WALs
@ 2018-12-11 14:00 Chris Withers <chris@withers.org>
  2018-12-11 14:48 ` Re: finding out what's generating WALs Achilleas Mantzios <achill@matrix.gatewaynet.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Chris Withers @ 2018-12-11 14:00 UTC (permalink / raw)
  To: pgsql-general

Hi All,

With a 9.4 cluster, what's the best way to find out what's generating 
the most WAL?

I'm looking after a multi-tenant PG 9.4 cluster, and we've started 
getting alerts for the number of WALs on the server.
It'd be great to understand what's generating all that WAL and what's 
likely to be causing any problems.\

More generally, what's number of WALs is "too much"? check_postgres.pl 
when used in nagios format only appears to be able to alert on absolute 
thresholds, does this always make sense? What's a good threshold to 
alert on?

cheers,

Chris




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: finding out what's generating WALs
  2018-12-11 14:00 finding out what's generating WALs Chris Withers <chris@withers.org>
@ 2018-12-11 14:48 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Achilleas Mantzios @ 2018-12-11 14:48 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

On 11/12/18 4:00 μ.μ., Chris Withers wrote:
> Hi All,
>
> With a 9.4 cluster, what's the best way to find out what's generating the most WAL?
>
> I'm looking after a multi-tenant PG 9.4 cluster, and we've started getting alerts for the number of WALs on the server.
> It'd be great to understand what's generating all that WAL and what's likely to be causing any problems.\
>

One way is to keep snapshots of pg_stat_user_tables and then try to identify spikes based on the various _tup fields.
Another way is to take a look in your archive (where you keep your archived wals), try to identify a period where excessive wals were generated and then use 
https://www.postgresql.org/docs/11/pgwaldump.html to see what's in there.

> More generally, what's number of WALs is "too much"? check_postgres.pl when used in nagios format only appears to be able to alert on absolute thresholds, does this always make sense? What's a good 
> threshold to alert on?
>

Regarding you wals in pg_wal,  a good threshold could be anything more than a e.g. 10% increase from wal_keep_segments with a trend to go up. If this number goes up chances are something bad is happening.

> cheers,
>
> Chris
>


-- 
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2018-12-11 14:48 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-12-11 14:00 finding out what's generating WALs Chris Withers <chris@withers.org>
2018-12-11 14:48 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>

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