Re: Hard limit on WAL space used (because PANIC sucks) - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Hard limit on WAL space used (because PANIC sucks)
Date
Msg-id CAM-w4HP8nThcxhaQRj_e8zx4A+EV6yseogWLAZ2Q=Z2aB8wp8w@mail.gmail.com
Whole thread Raw
In response to Re: Hard limit on WAL space used (because PANIC sucks)  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
On Thu, Jun 6, 2013 at 10:38 PM, Andres Freund <andres@2ndquadrant.com> wrote:
> That's not a bad technique. I wonder how reliable it would be in
> postgres. Do all filesystems allow a rename() to succeed if there isn't
> actually any space left? E.g. on btrfs I wouldn't be sure.  We need to
> rename because WAL files need to be named after the LSN timelineid...

I suppose we could just always do the rename at the same time as
setting up the current log file. That is, when we start wal log x also
set up wal file x+1 at that time.

This isn't actually guaranteed to be enough btw. It's possible that
the record we're actively about to write will require all of both
those files... But that should be very unlikely.


-- 
greg



pgsql-hackers by date:

Previous
From: Ants Aasma
Date:
Subject: Proposal for CSN based snapshots
Next
From: Josh Berkus
Date:
Subject: Re: Redesigning checkpoint_segments