From: | "Florian G(dot) Pflug" <fgp(at)phlo(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Simon Riggs <simon(at)2ndquadrant(dot)com>, "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Hannu Krosing <hannu(at)skype(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [PATCHES] WIP archive_timeout patch |
Date: | 2006-08-18 00:02:30 |
Message-ID: | 44E50396.3010101@phlo.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Tom Lane wrote:
> Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
>>> Revised patch enclosed, now believed to be production ready. This
>>> implements regular log switching using the archive_timeout GUC.
>
>> Further patch enclosed implementing these changes plus the record type
>> version of pg_xlogfile_name_offset()
>
> Applied with minor changes --- it seemed better to me to put tracking of
> the last xlog switch time directly into xlog.c, instead of having the
> bgwriter code try to determine whether a switch had happened recently.
>
> I noticed a minor annoyance while testing: when the system is completely
> idle, you get a forced segment switch every checkpoint_timeout seconds,
> even though there is nothing useful to log. The checkpoint code is
> smart enough not to do a checkpoint if nothing has happened since the
> last one, and the xlog switch code is smart enough not to do a switch
> if nothing has happened since the last one ... but they aren't talking
> to each other and so each one's change looks like "something happened"
> to the other one. I'm not sure how much trouble it's worth taking to
> prevent this scenario, though. If you can't afford a WAL file switch
> every five minutes, you probably shouldn't be using archive_timeout
> anyway ...
Actually, this behaviour IMHO even has it's advantages - if you can be
sure that at least one wal will be archived every 5 minutes, then it's
easy to monitor the replication - you can just watch the logfile if the
slave, and send a failure notice if no logfile is imported at least
every 10 minutes or so.
Of course, for this to be useful, the documentation would have to tell
people about that behaviour, and it couldn't easily be changed in the next
release...
greetings, Florian Pflug
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2006-08-18 00:02:32 | Re: Enum proposal / design |
Previous Message | Bruce Momjian | 2006-08-18 00:01:00 | Re: Autovacuum on by default? |
From | Date | Subject | |
---|---|---|---|
Next Message | Satoshi Nagayasu | 2006-08-18 00:15:59 | Re: pgstattuple extension for indexes |
Previous Message | Tom Lane | 2006-08-17 23:11:25 | Re: [PATCHES] WIP archive_timeout patch |