From: | "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
---|---|
To: | "Heikki Linnakangas *EXTERN*" <heikki(at)enterprisedb(dot)com> |
Cc: | "Simon Riggs" <simon(at)2ndquadrant(dot)com>, <pgsql-patches(at)postgresql(dot)org>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Improve shutdown during online backup |
Date: | 2008-04-08 07:16:33 |
Message-ID: | D960CB61B694CF459DCFB4B0128514C201FA55C5@exadv11.host.magwien.gv.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
[what should happen if a smart shutdown request is received during online backup mode?
I'll cc: the hackers list, maybe others have something to say to this]
Heikki Linnakangas wrote:
> Albe Laurenz wrote:
>> Moreover, if Shutdown == SmartShutdown, new connections won't be accepted,
>> and nobody can connect and call pg_stop_backup().
>> So even if I'd add a check for
>> (pmState == PM_WAIT_BACKENDS) && !BackupInProgress() somewhere in the
>> ServerLoop(), it wouldn't do much good, because the only way for somebody
>> to cancel online backup mode would be to manually remove the file.
>
> Good point.
>
>> So the only reasonable thing to do on smart shutdown during an online
>> backup is to have the shutdown request fail, right? The only alternative being
>> that a smart shutdown request should interrupt online backup mode.
>
> Or we can add another state, PM_WAIT_BACKUP, before PM_WAIT_BACKENDS,
> that allows new connections, and waits until the backup ends.
That's an option. Maybe it is possible to restrict connections to superusers
(who are the only ones who can call pg_stop_backup() anyway).
Or, we could allow superuser connections in state PM_WAIT_BACKENDS...
Opinions?
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2008-04-08 07:36:14 | Re: File system snapshots for multiple file systems |
Previous Message | Fujii Masao | 2008-04-08 06:05:32 | Re: File system snapshots for multiple file systems |
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2008-04-08 07:50:10 | Re: [PATCHES] Integer datetime by default |
Previous Message | Oleg Bartunov | 2008-04-08 06:50:53 | Re: Indexam API changes |