Re: Superuser connect during smart shutdown

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Superuser connect during smart shutdown
Date: 2014-10-17 04:25:16
Message-ID: 21422.1413519916@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> writes:
> Something else mentioned was that once you start a smart shutdown you
> have no good way (other than limited ps output) to see what the shutdown
> is waiting on. I'd like to have some way to get back into the database
> to see what's going on. Perhaps we could allow superusers to connect
> while waiting for shutdown.

I think this idea is going to founder on the fact that the postmaster
has no way to tell whether an incoming connection is for a superuser.
You don't find that out until you've connected to a database and run
a transaction (so you can read pg_authid). And by that point, you've
already had a catastrophic impact on any attempt to shut things down.

> It would also be good to be able to abort a smart shutdown if you
> determine it was a bad idea.

That sounds possibly more feasible.

But TBH I suspect 95% of the problems here would vanish if smart
shutdown weren't the default ...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2014-10-17 04:25:44 Re: Better support of exported snapshots with pg_dump
Previous Message Craig Ringer 2014-10-17 04:11:12 Re: detect custom-format dumps in psql and emit a useful error