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

From Christian Ullrich
Subject Re: Hard limit on WAL space used (because PANIC sucks)
Date
Msg-id koquts$a8n$1@ger.gmane.org
Whole thread Raw
In response to Hard limit on WAL space used (because PANIC sucks)  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: Hard limit on WAL space used (because PANIC sucks)
Re: Hard limit on WAL space used (because PANIC sucks)
List pgsql-hackers
* Heikki Linnakangas wrote:

> The current situation is that if you run out of disk space while writing
> WAL, you get a PANIC, and the server shuts down. That's awful. We can

> So we need to somehow stop new WAL insertions from happening, before
> it's too late.

> A naive idea is to check if there's enough preallocated WAL space, just
> before inserting the WAL record. However, it's too late to check that in

There is a database engine, Microsoft's "Jet Blue" aka the Extensible 
Storage Engine, that just keeps some preallocated log files around, 
specifically so it can get consistent and halt cleanly if it runs out of 
disk space.

In other words, the idea is not to check over and over again that there 
is enough already-reserved WAL space, but to make sure there always is 
by having a preallocated segment that is never used outside a disk space 
emergency.

-- 
Christian





pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Cost limited statements RFC
Next
From: Jeff Janes
Date:
Subject: Re: Vacuum, Freeze and Analyze: the big picture