Re: Removing archived wal files on Master

From: Prince Pathria <prince(dot)pathria(at)goevive(dot)com>
To: Michael King <michaelbking(at)hotmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Removing archived wal files on Master
Date: 2019-02-22 11:28:49
Message-ID: CAON0Dazq7HB3RsFdH4wfquCBX9CKo8uTnqCCb7CJ5yFjFBoZWQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

1. archive_mode = off
2. comment or delete archive_command parameter
3. reload the server
If you don't want archive logs, just rm the directory
/var/lib/postgresql/9.3/main/archive/ -> there's no harm in deleting them
as you said there's no streaming replication configured.
all your data is in pg_base and and pg_wal/pg_xlog

Happy to help :)
Prince Pathria Systems Architect Intern Evive +91 9478670472 goevive.com

On Fri, Feb 22, 2019 at 4:49 PM Michael King <michaelbking(at)hotmail(dot)com>
wrote:

> Hi,
> I recently acquired a legacy server. This is running Postgresql 9.3 on
> Ubuntu 16.04.
> There is around 200GB worth of archived wal files (~12,500 files) located
> on /var/lib/postgresql/9.3/main/archive.
> I have checked and can confirm that this is a standalone server without
> any Replication setup and no secondary/slave server talking to it.
>
> Checking the /etc/postgresql/9.3/main/postgresql.conf file (write ahead
> log section), shows the following:
> wal_level = minimal
> archive_mode = off
> archive_command = 'test ! -f /var/lib/postgresql/9.3/main/archive/%f && cp
> -i %p /var/lib/postgresql/9.3/main/archive/%f </dev/null'
>
> Replication section shows all default values.
>
> Could you please advice how I can cleanup all of these 200GB worth of
> files.
> I've searched through numerous postgresql books/blogs/articles which all
> have very good advise on how to setup wal archiving but unfortunately not
> on how to disable it.
>
> Kind regards,
> Michael
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Vikas Gupta 2019-02-22 12:09:24 Re: Removing archived wal files on Master
Previous Message Michael King 2019-02-22 11:19:32 Removing archived wal files on Master