Shridhar Daithankar <[EMAIL PROTECTED]> writes:
> William Yu wrote:
>> This is an intriguing thought which leads me to think about a similar 
>> solution for even a production server and that's a solid state drive for 
>> just the WAL. What's the max disk space the WAL would ever take up? 

> Maximum number of WAL segments at any time in 2*(number of checkpoint 
> segments)+1 IIRC.
> So if you have 3 checkpoint segments, you can not have more than 7 WAL
> segments at any time. Give or take 1.

I don't believe that's a *hard* limit.  The system tries to schedule
checkpoints often enough to prevent WAL from getting bigger than that,
but if you had a sufficiently big spike in update activity, it's at
least theoretically possible that more than checkpoint_segments segments
could be filled before the concurrently running checkpoint finishes and
releases some old segments.

The odds of this being a real problem are small, especially if you don't
try to fit on an undersized SSD by reducing checkpoint_segments.  I'd
think that a 512Mb SSD would be plenty of space for ordinary update load
levels ...

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to