Re: Stefan's bug (was: max_standby_delay considered harmful)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Stefan's bug (was: max_standby_delay considered harmful)
Дата
Msg-id 8578.1274710760@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Stefan's bug (was: max_standby_delay considered harmful)  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, May 24, 2010 at 9:28 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
>> On Mon, 2010-05-24 at 09:26 -0400, Robert Haas wrote:
>>> This looks pretty reasonable to me, but I guess I feel like it would
>>> be better to drive the CancelBackup() decision off of whether we've
>>> ever reached PM_RUN rather than consulting XLogCtl.
>> 
>> That is exactly what XLogCtl tells us and why it is suggested for use.

> Sure.  My only point is that the postmaster doesn't (and can't) use
> that method of getting the information at any other time when it is
> needed, so I don't know why we'd want to use it in just this one case.
>  Maybe there's a reason, but it's not obvious to me.

I'm with Robert on this.  The postmaster is designed to be driven by an
internal state machine.  Making it rely on the contents of shared memory
is a fundamentally dangerous idea.  It might coincidentally be safe in
this one case, but I can easily imagine that property failing as a result
of subsequent changes.

The postmaster should not look at shared memory if there is any
reasonable alternative, and we clearly have a reasonable alternative.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Idea for getting rid of VACUUM FREEZE on cold pages
Следующее
От: "Greg Sabino Mullane"
Дата:
Сообщение: Re: Specification for Trusted PLs?