Re: Immediate standby promotion
От
Simon Riggs
Тема
Re: Immediate standby promotion
Дата
Msg-id
CA+U5nMKam02HEtDNxVLiu83Jj+-uJsbFUKjgq32hOrTsX4s5sg@mail.gmail.com
Ответ на
Re: Immediate standby promotion (Robert Haas)
Список
Дерево обсуждения
Immediate standby promotion Fujii Masao <masao.fujii@gmail.com>
Re: Immediate standby promotion Tom Lane <tgl@sss.pgh.pa.us>
Re: Immediate standby promotion Robert Haas <robertmhaas@gmail.com>
Re: Immediate standby promotion Simon Riggs <simon@2ndquadrant.com>
Re: Immediate standby promotion Robert Haas <robertmhaas@gmail.com>
Re: Immediate standby promotion Simon Riggs <simon@2ndquadrant.com>
Re: Immediate standby promotion Andres Freund <andres@2ndquadrant.com>
Re: Immediate standby promotion Simon Riggs <simon@2ndquadrant.com>
Re: Immediate standby promotion Andres Freund <andres@2ndquadrant.com>
Re: Immediate standby promotion Robert Haas <robertmhaas@gmail.com>
Re: Immediate standby promotion Simon Riggs <simon@2ndquadrant.com>
Re: Immediate standby promotion Robert Haas <robertmhaas@gmail.com>
Re: Immediate standby promotion Andres Freund <andres@2ndquadrant.com>
Re: Immediate standby promotion Robert Haas <robertmhaas@gmail.com>
Re: Immediate standby promotion Michael Paquier <michael.paquier@gmail.com>
Re: Immediate standby promotion Fabrízio de Royes Mello <fabriziomello@gmail.com>
Re: Immediate standby promotion Kevin Grittner <kgrittn@ymail.com>
Re: Immediate standby promotion Amit Kapila <amit.kapila16@gmail.com>
Re: Immediate standby promotion Fujii Masao <masao.fujii@gmail.com>
Re: Immediate standby promotion Robert Haas <robertmhaas@gmail.com>
Re: Immediate standby promotion Amit Kapila <amit.kapila16@gmail.com>
On 14 August 2014 20:27, Robert Haas wrote: > On Thu, Aug 14, 2014 at 10:12 AM, Tom Lane wrote: >> Fujii Masao writes: >>> I'd like to propose to add new option "--immediate" to pg_ctl promote. >>> When this option is set, recovery ignores any WAL data which have not >>> been replayed yet and exits immediately. Patch attached. >> >>> This promotion is faster than normal one but can cause data loss. >> >> TBH, I cannot imagine a situation where that would be a sane thing to do. >> If you have WAL, why would you not replay what you have? The purpose >> of a database is to preserve your data, not randomly throw it away. > > I've wanted this a number of times, so I think it's quite sane. "fast" promotion was actually a supported option in r8 of Postgres but this option was removed when we implemented streaming replication in r9.0 The *rough* requirement is sane, but that's not the same thing as saying this exact patch makes sense. If you are paused and you can see that WAL up ahead is damaged, then YES, you do want to avoid applying it. That is possible by setting a PITR target so that recovery stops at a precise location specified by you. As an existing option is it better than the blunt force trauma suggested here. If you really don't care, just shutdown server, resetxlog and start her up - again, no need for new option. Anyway, my view is that this is a blunt instrument to do something we can already do. -- Simon Riggs http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления