Re: pg_upgrade failing from 9.3 to 9.4 because "template0" already exists

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Matt Landry <lelnet(dot)matt(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_upgrade failing from 9.3 to 9.4 because "template0" already exists
Date: 2015-03-06 20:43:43
Message-ID: 20150306204343.GX29780@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Matt,

* Matt Landry (lelnet(dot)matt(at)gmail(dot)com) wrote:
> postgres=# select datname, datallowconn from pg_database ;
> datname | datallowconn
> -----------+--------------
> template1 | t
> template0 | t
> postgres | t
> reporting | t
> (4 rows)

Right, as I mentioned, template0 shouldn't have datallowconn as 'true'.
That's why it's being included in the pg_dumpall.

On your test setup, run (as superuser):

update pg_database set datallowconn = false where datname = 'template0';

Then re-run the pg_upgrade.

Thanks!

Stephen

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message dpopova 2015-03-06 20:44:09 How to get plpython2 in /lib?
Previous Message John R Pierce 2015-03-06 20:40:17 Re: #PERSONAL# Reg: date going as 01/01/0001