Re: Old WAL files under pg_xlog not getting delete

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Ron <ronljohnsonjr(at)gmail(dot)com>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Old WAL files under pg_xlog not getting delete
Date: 2019-01-31 00:00:15
Message-ID: 201901310000.fkapsf6clz5s@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On 2019-Jan-30, Ron wrote:

> Plus the ".", ".." and archive_status directories, and lost+found if pg_xlog
> is it's own partition.  That's four of the unknown six.  Add a .backup file
> or two and all 506 files are accounted for.

Hmm ... I would recommend to keep the xlog files in a subdir, not the
root of the filesystem. So the lost+found would be, at the most, a
sibling of pg_xlog, not inside it. Otherwise, it seems too easy to get
in trouble if for whatever reason the filesystem is not mounted, your
database starts writing files in it, and the filesystem is mounted
later. Whatever files got written before mounting would be misteriously
"missing", and few people think to unmount the FS to see if they are in
the underlying filesystem.

Then again, if you read this advice then you're safe because next time
this happens to you, you'll remember to unmount to check, so you can
safely ignore me. Go figure.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message David G. Johnston 2019-01-31 00:11:04 Re: Old WAL files under pg_xlog not getting delete
Previous Message Ron 2019-01-30 23:37:25 Re: Old WAL files under pg_xlog not getting delete