Re: WAL files keep piling up

From: Zbigniew Kostrzewa <zkostrzewa(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Ninad Shah <nshah(dot)postgres(at)gmail(dot)com>, pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: WAL files keep piling up
Date: 2021-12-22 19:26:22
Message-ID: CA+VG59H-0_=yDbQjnaB4fSrk5QgMOYfCgQMoXZonhmMUdQS89w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-performance

I've just checked my second reproduction cluster (also Patroni but this
time on K8s). It also has non-empty `archive_status/` directory:

ls pg_xlog/ | grep -v history | wc -l
165

ls pg_xlog/archive_status/ | wc -l
81
ls pg_xlog/archive_status/ | grep done | wc -l
81

but on this cluster I did not enable `archive_mode` at any time:

postgres=# select name,setting from pg_settings where name like 'archive_%';
name | setting
-----------------+------------
archive_command | (disabled)
archive_mode | off
archive_timeout | 0

Yes, I am aware 9.6 is pretty old, soon I will be replacing it with 11.x.
Thanks.

Kind regards.

śr., 22 gru 2021 o 19:18 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> napisał(a):

> Zbigniew Kostrzewa <zkostrzewa(at)gmail(dot)com> writes:
> > Thanks for responding. On current master it looks like so:
> > ls pg_xlog/archive_status/ | grep ready | wc -l
> > 0
> > ls pg_xlog/archive_status/ | grep done | wc -l
> > 501
>
> Hmm, if you've got archiving turned off, I wonder why you have
> any .done files at all. Perhaps they are leftover from a time
> when you did have archiving on, and for some reason they are
> confusing the non-archive-mode cleanup logic.
>
> Anyway, you could certainly manually remove the .done files and
> the corresponding WAL segment files, and then see what happens.
>
> BTW, I'm sure you realize that 9.6.15 is not exactly current.
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Laurenz Albe 2021-12-23 10:04:09 Re: WAL files keep piling up
Previous Message Tom Lane 2021-12-22 18:18:11 Re: WAL files keep piling up