Re: [HACKERS] Crash on promotion when recovery.conf is renamed
| От | Heikki Linnakangas |
|---|---|
| Тема | Re: [HACKERS] Crash on promotion when recovery.conf is renamed |
| Дата | |
| Msg-id | 6ad88b1b-18e2-5e40-15cb-fef2d477d1ea@iki.fi обсуждение исходный текст |
| Ответ на | [HACKERS] Crash on promotion when recovery.conf is renamed (Magnus Hagander <magnus@hagander.net>) |
| Ответы |
Re: [HACKERS] Crash on promotion when recovery.conf is renamed
|
| Список | pgsql-hackers |
On 12/15/2016 10:44 AM, Magnus Hagander wrote: > I wonder if there might be more corner cases like this, but in this > particular one it seems easy enough to just say that failing to rename > recovery.conf because it didn't exist is safe. Yeah. It's unexpected though, so I think erroring out is quite reasonable. If the recovery.conf file went missing, who knows what else is wrong. > But in the case of failing to rename recovery.conf for example because of > permissions errors, we don't want to ignore it. But we also really don't > want to end up with this kind of inconsistent data directory IMO. I don't > know that code well enough to suggest how to fix it though -- hoping for > input for someone who knows it closer? Hmm. Perhaps we should write the timeline history file only after renaming recovery.conf. In general, we should keep the window between writing the timeline history file and writing the end-of-recovery record as small as possible. I don't think we can eliminate it completely, but it makes sense to minimize it. Something like the attached (completely untested). - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Вложения
В списке pgsql-hackers по дате отправления: