PostgreSQL 9.6 wals management

From: Mariel Cherkassky <mariel(dot)cherkassky(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: PostgreSQL 9.6 wals management
Date: 2017-11-20 09:02:40
Message-ID: CA+t6e1m2PKkorPUZJS+0Kx=RwQuBWqXUs6d571bJt2Mri2D+Sg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi,
I'm trying to understand my wals behavior on my postgresql environment.
My wal settings are :

wal_keep_segments = 200
max_wal_size = 3GB
min_wal_size = 80MB
archive_command = 'cp %p /PostgreSQL-wal/9.6/pg_xlog/wal_archives/%f'
archive_timeout = 10
#checkpoint_flush_after = 256kB
#checkpoint_completion_target = 0.5

My wals directory is /PostgreSQL-wal/9.6/pg_xlog/ and my archives directory
is PostgreSQL-wal/9.6/pg_xlog/wal_archives.
Last night my wals directory storage got full(archive directory also
because they are on the same fs..)l

I have right now 211 wals in my wal`s directory :

ls -l /PostgreSQL-wal/9.6/pg_xlog/ | wc -l
212

The only thing that was running during the night are only selects from our
monitoring agent. I guess that wal were created because the archive_timeout
was very low and they were deleted because the wal_keep_segments was high.

This morning , I set the wal_keep_segments to 100 and I set the
archive_timeout to 6 minutes. Now, after setting those settings and
starting the cluster wals switch is working fine and I didnt see that many
wals were created. However, doesnt the old wals should be deleted
automaticly ? Can I delete archives safely ?

Thanks , Mariel.

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Michael Paquier 2017-11-20 12:28:52 Re: PostgreSQL 9.6 wals management
Previous Message Neto pr 2017-11-18 01:52:04 POWA doesn't show queries executed