AW: Idea: recycle WAL segments, don't delete/recreate ' em - Mailing list pgsql-hackers

From Zeugswetter Andreas SB
Subject AW: Idea: recycle WAL segments, don't delete/recreate ' em
Date
Msg-id 11C1E6749A55D411A9670001FA687963368389@sdexcsrv1.f000.d0188.sd.spardat.at
Whole thread Raw
Responses Re: AW: Idea: recycle WAL segments, don't delete/recreate ' em
List pgsql-hackers
> I just had an idea about how to avoid this cost:
> why not recycle old log segments?  At the point where the code
> currently deletes a no-longer-needed segment, just rename it to
> become the next created-in-advance segment.

Yes, since I already suggested this on Feb 26. I naturally think this 
is a good idea, iirc Vadim also stated similar ideas.

http://fts.postgresql.org/db/mw/msg.html?mid=73076

Maybe I did not make myself clear enough though, you clearly did better :-)

> Another issue is whether the recycling logic should be "always recycle"
> (hence number of extant WAL segments will never decrease), or should
> it be more like "recycle if there are fewer than WAL_FILES advance
> segments, else delete".

Yes, I think we should use the WAL_FILES parameter to state how many WAL files
should be kept around, or better yet only use it if it is not 0.
Thus the default would be to never decrease, but if the admin went to the 
trouble of specifying a (good) value, that should imho be honored.

Andreas


pgsql-hackers by date:

Previous
From: Tim Allen
Date:
Subject: analyze strangeness
Next
From: jerome crouigneau
Date:
Subject: Memory management