pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Torsten Krah <krah.tm@gmail.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Force WAL cleanup on running instance
Date: Wed, 11 Mar 2020 18:39:52 +0100
Message-ID: <f046621eeaae39ad2adc26280ea304ceaca3fcbe.camel@gmail.com> (raw)
In-Reply-To: <87sgievnyu.fsf@jsievers.enova.com>
References: <3f91429eb65ac8aa3c77361c587e786a290b92f0.camel@gmail.com>
	<CANP8+j+q05ZsoZieAwJrbniOZmWjo6hXhzW4X86uL4HqdF-y_A@mail.gmail.com>
	<ea15b0c186f7ce94fbcf78e8ee1a4bad8745af09.camel@gmail.com>
	<87sgievnyu.fsf@jsievers.enova.com>

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






view thread (9+ messages)

Message-ID: <f046621eeaae39ad2adc26280ea304ceaca3fcbe.camel@gmail.com>
Permalink:  ../f046621eeaae39ad2adc26280ea304ceaca3fcbe.camel@gmail.com/
Also on:    postgresql.org/message-id/f046621eeaae39ad2adc26280ea304ceaca3fcbe.camel@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: krah.tm@gmail.com
  Subject: Re: Force WAL cleanup on running instance
  In-Reply-To: <f046621eeaae39ad2adc26280ea304ceaca3fcbe.camel@gmail.com>
  References: <3f91429eb65ac8aa3c77361c587e786a290b92f0.camel@gmail.com> <CANP8+j+q05ZsoZieAwJrbniOZmWjo6hXhzW4X86uL4HqdF-y_A@mail.gmail.com> <ea15b0c186f7ce94fbcf78e8ee1a4bad8745af09.camel@gmail.com> <87sgievnyu.fsf@jsievers.enova.com> <f046621eeaae39ad2adc26280ea304ceaca3fcbe.camel@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox