From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | Stephen Frost <sfrost(at)snowman(dot)net>, Alex Shulgin <ash(at)commandprompt(dot)com>, Jaime Casanova <jaime(at)2ndquadrant(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Turning recovery.conf into GUCs |
Date: | 2014-11-23 20:32:43 |
Message-ID: | 20141123203243.GB28946@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2014-11-21 10:59:23 -0800, Josh Berkus wrote:
> On 11/21/2014 10:54 AM, Stephen Frost wrote:
> > * Josh Berkus (josh(at)agliodbs(dot)com) wrote:
> >>> Either way, from the code it is clear that we only stay in recovery if
> >>> standby_mode is directly turned on. This makes the whole check for a
> >>> specially named file unnecessary, IMO: we should just check the value of
> >>> standby_mode (which is off by default).
> >>
> >> So, what happens when someone does "pg_ctl promote"? Somehow
> >> standby_mode needs to get set to "off". Maybe we write "standby_mode =
> >> off" to postgresql.auto.conf?
> >
> > Uhh, and then not work for the sane folks who disable
> > postgresql.auto.conf? No thanks..
>
> Other ideas then, without reverting to the old system? Being able to
> promote servers over port 5432 will be a huge advantage for
> container-based systems, so I don't want to give that up as a feature.
Why is a trigger file making that impossible? Adding the code from
pg_ctl promote into a SQL callable function is a couple minutes worth of
work?
A guc alone won't work very well - standby_mode is checked in specific
places, you can't just turn that off and expect that that'd result in
speedy promotion. And it'd break people using scripts pg_standby. And it also
has other effects.
So, no.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2014-11-23 20:38:56 | Re: superuser() shortcuts |
Previous Message | Tomas Vondra | 2014-11-23 20:19:56 | Re: Yet another abort-early plan disaster on 9.3 |