Re: Improve shutdown during online backup, take 4

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: Improve shutdown during online backup, take 4
Дата
Msg-id D960CB61B694CF459DCFB4B0128514C202043C02@exadv11.host.magwien.gv.at
обсуждение исходный текст
Ответ на Re: Improve shutdown during online backup, take 4  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-patches
Alvaro Herrera wrote:
> I think the messages should not have a newline in the middle.
>
> Also, I am wondering if in PM_WAIT_BACKUP mode we should accept new
> connections from superusers only.

I spent some thought on that.
You'd need to wait until the user is authenticated before you can determine
if he/she is a superuser and may connect (otherwise I think it would be a
security leak that enables any attacker to find out whether a given user is
a superuser without knowing the password).

By that time the server process is already forked.
I couldn't see a way to check the postmaster state at that point,
so I decided not to try and keep it simple.

If you have any ideas how I could do such a check reasonably,
I'd be happy to try it, because basically I think it would be the
right thing.

Yours,
Laurenz Albe

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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Improve shutdown during online backup, take 4
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Snapshot management, final