archive_timeout behaviour when archive_mode is off (was Re: Too frequent checkpoints ?)

From: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: archive_timeout behaviour when archive_mode is off (was Re: Too frequent checkpoints ?)
Date: 2013-02-15 06:12:29
Message-ID: CABOikdM1D1jtcO59MEvgPpM2A9tit5JPs2yDwqeUQENnMMEvxg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

(changing subject)

On Thu, Feb 14, 2013 at 11:48 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> On Mon, Feb 11, 2013 at 5:46 PM, Pavan Deolasee
>> I also noticed that the WAL file switch
>> happens after archive_timeout seconds irrespective of whether
>> archive_mode is turned ON or not. This happens because we don't check
>> if XLogArchivingActive() in CheckArchiveTimeout() function. It looks
>> wrong to me.
>
> +1 to fix this. I've not heard the use case where archive_timeout needs to
> be used even in not archive mode...
>

Ok, I will write a patch to fix this. I wonder if this is worth
backpatching though. The code is like that for a long time and the
fact that we haven't heard any complaints about it, may be its not
worth fixing in the stable branches. But I wonder if anyone else
thinks otherwise.

I think we should also update the documentation to be clear that
archive_timeout and archive_command are used only when archive_mode is
turned on.

Thanks,
Pavan

--
Pavan Deolasee
http://www.linkedin.com/in/pavandeolasee

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavan Deolasee 2013-02-15 06:42:39 Re: I think we need PRE_COMMIT events for (Sub)XactCallbacks
Previous Message Alvaro Herrera 2013-02-15 04:02:58 Re: PATCH: Split stats file per database WAS: autovacuum stress-testing our system