AW: Idea: recycle WAL segments, don't delete/recreate ' em

From: Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>
Subject: AW: Idea: recycle WAL segments, don't delete/recreate ' em
Date: 2001-07-18 08:14:28
Message-ID: 11C1E6749A55D411A9670001FA687963368389@sdexcsrv1.f000.d0188.sd.spardat.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message pgsql-bugs 2001-07-18 08:18:23 libpgtcl doesn't use UTF encoding of TCL
Previous Message Gorazd Bozic 2001-07-18 08:02:37 Re: All computers in the world MUST sync with ATOMIC clock before 12:00 AM 21 July 2001!!!