Re: Improve shutdown during online backup

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>, "Heikki Linnakangas *EXTERN*" <heikki(at)enterprisedb(dot)com>, <pgsql-patches(at)postgresql(dot)org>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Improve shutdown during online backup
Date: 2008-04-16 13:09:38
Message-ID: 87mynuvtd9.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

"Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:

> Personally, I think "smart" shutdown could be even smarter. It should
> kick off unwanted sessions, such as an idle pgAdmin session - maybe a
> rule like "anything that has been idle for >30 seconds".

That's not a bad idea in itself but I don't think it's something the server
should be in the business of doing. One big reason is that the server
shouldn't be imposing arbitrary policy. That should be something the person
running the shutdown is in control over.

What you could do is have a separate program (I would write a client but a
server-side function would work too) to kick off users based on various
criteria you can specify.

Then you can put in your backup scripts two commands, one to kick off idle
users and then do a smart shutdown.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's PostGIS support!

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2008-04-16 13:55:32 Re: pgwin32_safestat weirdness
Previous Message Gregory Stark 2008-04-16 12:48:47 Re: Collation at database level

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2008-04-16 14:37:41 Re: options for RAISE statement
Previous Message kenneth d'souza 2008-04-16 12:00:40 Re: Reference by output in : \d <table_name>