Re: Force WAL cleanup on running instance - Mailing list pgsql-general

From Torsten Krah
Subject Re: Force WAL cleanup on running instance
Date
Msg-id f046621eeaae39ad2adc26280ea304ceaca3fcbe.camel@gmail.com
Whole thread Raw
In response to Re: Force WAL cleanup on running instance  (Jerry Sievers <gsievers19@comcast.net>)
List pgsql-general
Am Mittwoch, den 11.03.2020, 11:46 -0500 schrieb Jerry Sievers:
> If your site can afford a restart after the bulk load,
> 
> 1. Clean shutdown.
> 2. pg_resetwal
> 3. Start 
> 
> That should leave you with a very small N WAL files, perhaps just 1,
> though I've not run it lately to reverify.

Thanks - that worked like a charm and is exactly what I was looking
for, of cause I can afford that, it's shutdown after the init anyway -
so after running pg_resetwal this was left:

root@53e0d45ce5d7:/var/lib/postgresql/data/pg_wal# ls -lh
total 17M
-rw------- 1 postgres postgres  16M Mär 11 17:23 000000010000000000000012
drwx------ 2 postgres postgres 4,0K Mär 11 17:13 archive_status

Nice one :) thanks.

kind regards

Torsten




pgsql-general by date:

Previous
From: Paul Förster
Date:
Subject: Re: Force WAL cleanup on running instance
Next
From: Adrian Klaver
Date:
Subject: Re: How to discover what table is