pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Hannes Erven <hannes@erven.at>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Unused files in the database directory after crashed VACUUM FULL
Date: Sun, 10 Feb 2019 18:20:59 -0500
Message-ID: <15097.1549840859@sss.pgh.pa.us> (raw)
In-Reply-To: <4ae62ff0-f33e-2a26-79ff-dcaa39ee92ff@erven.at>
References: <da60fd67-f660-39f2-764f-c5792ca568e8@erven.at>
	<17143.1549813268@sss.pgh.pa.us>
	<4ae62ff0-f33e-2a26-79ff-dcaa39ee92ff@erven.at>

Hannes Erven <hannes@erven.at> writes:
> Am 10.02.19 um 16:41 schrieb Tom Lane:
>> What do you mean by "crash" exactly?

> Here's the exact log (the pgadmin process was running the VACCUM FULL):
> 2019-02-09 23:44:53.516 CET [20341] @/ <> PANIC:  could not write to 
> file "pg_wal/xlogtemp.20341": No space left on device

Ah, so Andrew was correct: we panicked due to lack of WAL space, and
that explains why the vacuuming process didn't have an opportunity
to delete the files belonging to the uncommitted new relation.

If you're concerned about this sort of thing, you might consider putting
the WAL directory on a separate filesystem from the main database files.

>>> Is there a safe procedure how to
>>> check/clean up "unnecessary" files in the cluster directory?

>> You just described it --- verify with pg_filenode_relation that the
>> file doesn't correspond to any pg_class entry, then manually delete.

> OK, I see. I came up with this:

I think this isn't accounting for files in non-default
tablespaces, but maybe that's not a problem for your usage.

> Is this interesting enough to further investigate?

It's a pretty well-understood dynamic, I believe.  Perhaps we should
try harder to recover cleanly, but I don't know of anyone putting
effort into the case.

			regards, tom lane




view thread (6+ messages)  latest in thread

Message-ID: <15097.1549840859@sss.pgh.pa.us>
Permalink:  ../15097.1549840859@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15097.1549840859@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, hannes@erven.at
  Subject: Re: Unused files in the database directory after crashed VACUUM FULL
  In-Reply-To: <15097.1549840859@sss.pgh.pa.us>
  References: <da60fd67-f660-39f2-764f-c5792ca568e8@erven.at> <17143.1549813268@sss.pgh.pa.us> <4ae62ff0-f33e-2a26-79ff-dcaa39ee92ff@erven.at> <15097.1549840859@sss.pgh.pa.us>

* 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