Re: Turning recovery.conf into GUCs
От | Andres Freund |
---|---|
Тема | Re: Turning recovery.conf into GUCs |
Дата | |
Msg-id | 20141123203243.GB28946@alap3.anarazel.de обсуждение исходный текст |
Ответ на | Re: Turning recovery.conf into GUCs (Josh Berkus <josh@agliodbs.com>) |
Список | 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@agliodbs.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
В списке pgsql-hackers по дате отправления: