Re: pg_upgrade if 'postgres' database is dropped

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Bruce Momjian <bruce(at)momjian(dot)us>
Subject: Re: pg_upgrade if 'postgres' database is dropped
Date: 2011-10-21 14:46:30
Message-ID: CA+TgmobhHM1R5Pgk96syW17t=Nzj9MCkSeAj3oT5bmL0WYVtrQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 4, 2011 at 12:11 PM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> pg_upgrade doesn't work if the 'postgres' database has been dropped in the
> old cluster:
>
> ~/pgsql.master$ bin/pg_upgrade -b ~/pgsql.91stable/bin -B bin/ -d
> ~/pgsql.91stable/data -D data-upgraded/
> Performing Consistency Checks
> -----------------------------
> Checking current, bin, and data directories                 ok
> Checking cluster versions                                   ok
> Checking database user is a superuser                       ok
> Checking for prepared transactions                          ok
> Checking for reg* system OID user data types                ok
> Checking for contrib/isn with bigint-passing mismatch       ok
> Creating catalog dump                                       ok
> Checking for prepared transactions                          ok
>
> New cluster database "postgres" does not exist in the old cluster
> Failure, exiting
>
>
> That's a bit unfortunate. We have some other tools that don't work without
> the 'postgres' database, like 'reindexdb -all', but it would still be nice
> if pg_upgrade did.

+1. I think our usual policy is to try postgres first and then try
template1, so it would seem logical for pg_upgrade to do the same.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-10-21 14:47:46 Re: [v9.2] Fix Leaky View Problem
Previous Message Phil Sorber 2011-10-21 14:42:37 Re: pg_dumpall Sets Roll default_tablespace Before Creating Tablespaces