Re: pg_wal directory

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Yambu <hyambu(at)gmail(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_wal directory
Date: 2021-07-16 16:33:16
Message-ID: CAKFQuwZJisSBB_qxWY8DpAn0kWDo_mpnp+pjh1CRjdc7gzp8Ow@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Fri, Jul 16, 2021 at 2:43 AM Yambu <hyambu(at)gmail(dot)com> wrote:

> Hello
>
> May i know which setting in postgres controls the size and number of wal
> files kept in pg_wal directory? We have 245 wal files and total size is
> 3.5GB
>

> We do NOT have replication in place
>
>
So how are you doing WAL archiving for backups? Because most likely that
is broken and thus PostgreSQL doesn't feel safe in removing the unarchived
WAL.

we are using
> Pg 12.7
>
> max_wal_size 16G
>

That seems a bit excessive...and above your current usage so it is possible
you simply need that many segments given the volume of WAL your server
produces (you omitted mentioning the time frame for the WAL)

> wal_keep_segments 8
>

You don't have replication in place so wal_keep_segments, a replication
GUC, is immaterial here.

David J.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Firthouse banu 2021-07-17 07:24:57 Need query
Previous Message Yambu 2021-07-16 09:43:37 pg_wal directory