Skip site navigation (1) Skip section navigation (2)

Re: Decreasing WAL size effects

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: Kyle Cordes <kyle(at)kylecordes(dot)com>
Cc: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: Decreasing WAL size effects
Date: 2008-10-30 21:10:08
Message-ID: Pine.GSO.4.64.0810301657390.28733@westnet.com (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
On Thu, 30 Oct 2008, Kyle Cordes wrote:

> It sure would be nice if there was a way for PG itself to zero the unused 
> portion of logs as they are completed, perhaps this will make it in as part 
> of the ideas discussed on this list a while back to make a more "out of the 
> box" log-ship mechanism?

The overhead of clearing out the whole thing is just large enough that it 
can be disruptive on systems generating lots of WAL traffic, so you don't 
want the main database processes bothering with that.  A related fact is 
that there is a noticable slowdown to clients that need a segment switch 
on a newly initialized and fast system that has to create all its WAL 
segments, compared to one that has been active long enough to only be 
recycling them.  That's why this sort of thing has been getting pushed 
into the archive_command path; nothing performance-sensitive that can slow 
down clients is happening there, so long as your server is powerful enough 
to handle that in parallel with everything else going on.

Now, it would be possible to have that less sensitive archive code path 
zero things out, but you'd need to introduce a way to note when it's been 
done (so you don't do it for a segment twice) and a way to turn it off so 
everybody doesn't go through that overhead (which probably means another 
GUC).  That's a bit much trouble to go through just for a feature with a 
fairly limited use-case that can easily live outside of the engine 
altogether.

--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

In response to

Responses

pgsql-hackers by date

Next:From: Kyle CordesDate: 2008-10-30 21:16:43
Subject: Re: Decreasing WAL size effects
Previous:From: Jason LongDate: 2008-10-30 20:51:18
Subject: Re: Decreasing WAL size effects

pgsql-general by date

Next:From: Kyle CordesDate: 2008-10-30 21:16:43
Subject: Re: Decreasing WAL size effects
Previous:From: Berend ToberDate: 2008-10-30 21:05:46
Subject: Re: Schema Upgrade Howto

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group