From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeremy Wilson <jwilson@clover.co>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Issue upgrading from 9.5 to 13 with pg_upgrade: "connection to database failed: FATAL: database "template1" does not exist"
Date: Fri, 13 Nov 2020 10:23:05 -0500
Message-ID: <286345.1605280985@sss.pgh.pa.us> (raw)
In-Reply-To: <6DBC6B57-422B-4A5C-8116-5615FEBC0DF7@clover.co>
References: <F1F5603B-5145-46B2-B137-8BAC7FBCE15F@clover.co>
<bdd88360-4ea3-bde6-5383-6ee1f4e97892@aklaver.com>
<793E4164-90E9-41F0-B74C-129E1DB76408@clover.co>
<5d5bd3f7-8158-97fa-9d6e-064af852f5ec@aklaver.com>
<6DBC6B57-422B-4A5C-8116-5615FEBC0DF7@clover.co>
Jeremy Wilson <jwilson@clover.co> writes:
>> On Nov 13, 2020, at 10:09 AM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
>> In your previous post you had --socketdir=/var/run/postgresql/. Did you change that or is it missing?
> Sorry, here it is with the socket directory specified.
An incorrect socket-directory setting would lead to something like
"could not connect to server: No such file or directory", not to a
specific complaint about a database not being present.
Unless ... could it be that there is another PG server active on the
machine, whose cluster lacks a "template1" database? Seems unlikely,
but you might try confirming with "ps auxww | grep post" or the like.
I also wonder if the cluster you're trying to upgrade from has a
"template1" database. Not sure if anyone has ever tested whether
pg_upgrade can cope with the lack of one.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, jwilson@clover.co, adrian.klaver@aklaver.com
Subject: Re: Issue upgrading from 9.5 to 13 with pg_upgrade: "connection to database failed: FATAL: database "template1" does not exist"
In-Reply-To: <286345.1605280985@sss.pgh.pa.us>
References: <F1F5603B-5145-46B2-B137-8BAC7FBCE15F@clover.co> <bdd88360-4ea3-bde6-5383-6ee1f4e97892@aklaver.com> <793E4164-90E9-41F0-B74C-129E1DB76408@clover.co> <5d5bd3f7-8158-97fa-9d6e-064af852f5ec@aklaver.com> <6DBC6B57-422B-4A5C-8116-5615FEBC0DF7@clover.co> <286345.1605280985@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox