Re: pg_wal keeps growing

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Yambu <hyambu(at)gmail(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_wal keeps growing
Date: 2021-02-03 15:55:44
Message-ID: CABUevExatPHpQPTFdVyPK+eiPoa_40z_rzyLozA2Bk-bQ5u7Mw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, Feb 3, 2021 at 4:53 PM Yambu <hyambu(at)gmail(dot)com> wrote:
>
> Hello
>
> My pg_wal directory keeps growing in size. Im using Pg v10
>
> Currently its at 53GB in size.
>
> Below are my settings
>
> select name,setting,unit from pg_settings where name ilike '%wal%';
> name | setting | unit
> ------------------------------+-----------+------
> max_wal_senders | 10 |
> max_wal_size | 1024 | MB
> min_wal_size | 80 | MB
> wal_block_size | 8192 |
> wal_buffers | 2048 | 8kB
> wal_compression | off |
> wal_consistency_checking | |
> wal_keep_segments | 0 |
> wal_level | replica |
> wal_log_hints | off |
> wal_receiver_status_interval | 10 | s
> wal_receiver_timeout | 60000 | ms
> wal_retrieve_retry_interval | 5000 | ms
> wal_segment_size | 2048 | 8kB
> wal_sender_timeout | 60000 | ms
> wal_sync_method | fdatasync |
> wal_writer_delay | 200 | ms
> wal_writer_flush_after | 128 | 8kB

My guess is you have one or more replication slots blocking it. Check
with SELECT * FROM pg_replication_slots, and drop anything that's not
in use (or fix the standby that's falling behind if there are only the
ones that should be in use).

--
Magnus Hagander
Me: https://www.hagander.net/
Work: https://www.redpill-linpro.com/

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Alex Balashov 2021-02-03 16:00:17 Re: pg_wal keeps growing
Previous Message Yambu 2021-02-03 15:53:30 pg_wal keeps growing