Re: Improve shutdown during online backup, take 4 - Mailing list pgsql-patches

From Albe Laurenz
Subject Re: Improve shutdown during online backup, take 4
Date
Msg-id D960CB61B694CF459DCFB4B0128514C202043C02@exadv11.host.magwien.gv.at
Whole thread Raw
In response to Re: Improve shutdown during online backup, take 4  (Alvaro Herrera <alvherre@commandprompt.com>)
List 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 by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Improve shutdown during online backup, take 4
Next
From: Alvaro Herrera
Date:
Subject: Re: Snapshot management, final