Re: Upgrading rant.

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>, Hannu Krosing <hannu(at)tm(dot)ee>, mlw <pgsql(at)mohawksoft(dot)com>, Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Upgrading rant.
Date: 2003-01-05 04:24:14
Message-ID: 200301050424.h054OEu17103@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Oliver Elphick <olly(at)lfix(dot)co(dot)uk> writes:
> > On Sat, 2003-01-04 at 02:17, Tom Lane wrote:
> >> There isn't any simple way to lock *everyone* out of the DB and still
> >> allow pg_upgrade to connect via the postmaster, and even if there were,
> >> the DBA could too easily forget to do it.
>
> > I tackled this issue in the Debian upgrade scripts.
>
> > I close the running postmaster and open a new postmaster using a
> > different port, so that normal connection attempts will fail because
> > there is no postmaster running on the normal port.
>
> That's a good kluge, but still a kluge: it doesn't completely guarantee
> that no one else connects while pg_upgrade is trying to do its thing.

I was thinking about using GUC:

#max_connections = 32
#superuser_reserved_connections = 2

Set both of those to 1, and you lock out everyone but the super-user.
In fact, we can specify those on postmaster start with -c
max_connections=1, etc.

> I am also concerned about the consequences of automatic background
> activities. Even the periodic auto-CHECKPOINT done by current code
> is not obviously safe to run behind pg_upgrade's back (it does make
> WAL entries). And the auto-VACUUM that we are currently thinking of
> is even less obviously safe. I think that someday, running pg_upgrade
> standalone will become *necessary*, not just a good safety feature.

Yes, certainly we are in major hack mode with pg_upgrade.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-01-05 04:37:59 Re: Upgrading rant.
Previous Message Giles Lean 2003-01-05 03:05:45 Re: [GENERAL] v7.3.1 Bundled and Released ...