Re: Deleted WAL files held open by backends in Linux - Mailing list pgsql-hackers

From Itagaki Takahiro
Subject Re: Deleted WAL files held open by backends in Linux
Date
Msg-id 20091126122011.5BA3.52131E4D@oss.ntt.co.jp
Whole thread Raw
In response to Deleted WAL files held open by backends in Linux  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-hackers
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> wrote:

> I guess it is a stretch to imagine that a database would have
> enough read-only connections to exhaust resources by holding open
> one deleted WAL file each; unless they have, say, 200 such
> connections and they're cutting things so close that a wasted 3.2GB
> of disk space at the WAL file location will run them out.

AFAIK, we rename and reuse old WAL segment files.
So, we don't waste disk space unless checkpoint_segments are too small.

Also, if you are worried about disk space,
how about adding ftruncate(to 0 byte) before unlink() ?

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center




pgsql-hackers by date:

Previous
From: hgonzalez@gmail.com
Date:
Subject: Re: Timezones (in 8.5?)
Next
From: Pavel Stehule
Date:
Subject: Re: [PATCH 4/4] Add tests to dblink covering use of COPY TO FUNCTION