Re: reaper should restart archiver even on standby

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: reaper should restart archiver even on standby
Date: 2015-06-08 20:21:21
Message-ID: 20150608202121.GR133018@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Fujii Masao wrote:
> Hi,
>
> When the archiver exits, currently reaper() restarts it only while
> the postmaster state is PM_RUN. This is OK in 9.4 or before because
> the archiver could be running on that state. But in 9.5, we can set
> archive_mode to "always" and start the archiver even on the standby.
> So I think that reaper() should restart the archiver even when
> the postmaster state is PM_RECOVERY or PM_HOT_STANDBY with
> some conditions. Patch attached.

Sounds reasonable, but the patch looks pretty messy. Can't we create
some common function that would be called both here and on ServerLoop?
We also have sigusr1_handler that starts an archiver -- why does that
one use different conditions? Also, the block at lines 2807ff seems
like it ought to be changed as well?

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joel Jacobson 2015-06-08 20:26:38 Re: pg_stat_*_columns?
Previous Message Joshua D. Drake 2015-06-08 19:56:03 Re: [CORE] back-branch multixact fixes & 9.5 alpha/beta: schedule