Re: pg_upgrade using appname to lock out other users - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: pg_upgrade using appname to lock out other users
Date
Msg-id 201106150340.p5F3eM427316@momjian.us
Whole thread Raw
In response to Re: pg_upgrade using appname to lock out other users  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pg_upgrade using appname to lock out other users
List pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > You might remember we added a postmaster/postgres -b switch to indicate
> > binary upgrade mode.  The attached patch prevents any client without an
> > application_name of 'binary-upgrade' from connecting to the cluster
> > while it is binary upgrade mode.  This helps prevent unauthorized users
> > from connecting during the upgrade.  This will not help for clusters
> > that do not have the -b flag, e.g. pre-9.1.
> 
> > Does this seem useful?
> 
> No ... that seems like a kluge.  It's ugly and it's leaky.
> 
> What we really ought to be doing here is fixing things so that
> pg_upgrade does not need to have a running postmaster in either
> installation, but works with some variant of standalone mode.
> That would actually be *safe* against concurrent connections,
> rather than only sorta kinda maybe safe.

I keep replying to that suggestion by reminding people that pg_upgrade
relies heavily on psql features, as does pg_dumpall, and recoding that
in the backend will be error-prone.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_upgrade using appname to lock out other users
Next
From: Robert Haas
Date:
Subject: Re: [WIP] cache estimates, cache access cost