Re: Standby WAL Cleanup?

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Don Seiler <don(at)seiler(dot)us>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Standby WAL Cleanup?
Date: 2017-08-14 20:58:30
Message-ID: CAECtzeWh0WWZgiXjvWSk+o65BHc7SqO8DihL8FXOoFT-1z0xhg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

2017-08-14 17:42 GMT+02:00 Don Seiler <don(at)seiler(dot)us>:

> I'm following through the workflow from primary to standby in our
> environment. However the one thing I can't seem to find is how WAL files
> are cleaned up from $PGDATA/pg_xlog once they are no longer needed on the
> standby.
>
> The standby has archive_cleanup_command calling pg_archivecleanup to
> remove files from the incoming archive directory. My understanding is that
> files from there are restored to the pg_xlog directory via the
> restore_command, which jives with what I see in pg_xlog.
>
> However something is cleaning up files from pg_xlog and I don't see any
> parameter command or cron job that does so. My documentation and list
> archive searching has come up empty so I thought I'd bug you guys yet again.
>
> TL;DR: What cleans up restored WAL files from pg_xlog when they are no
> longer needed?
>
>
The server removes the WAL files it doesn't need anymore, weither it is a
primary (after a checkpoint) or a secondary node (after a restartpoint).
That's just part of the usual process.

--
Guillaume.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Don Seiler 2017-08-14 21:08:40 Re: Standby WAL Cleanup?
Previous Message Don Seiler 2017-08-14 15:42:45 Standby WAL Cleanup?