Re: Improve shutdown during online backup - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Improve shutdown during online backup
Date
Msg-id 87mynuvtd9.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: [PATCHES] Improve shutdown during online backup  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers
"Simon Riggs" <simon@2ndquadrant.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!

pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: Collation at database level
Next
From: Magnus Hagander
Date:
Subject: Re: pgwin32_safestat weirdness