Re: Issue upgrading from 9.5 to 13 with pg_upgrade: "connection to database failed: FATAL: database "template1" does not exist"

From: Jeremy Wilson <jwilson(at)clover(dot)co>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Issue upgrading from 9.5 to 13 with pg_upgrade: "connection to database failed: FATAL: database "template1" does not exist"
Date: 2020-11-13 16:40:56
Message-ID: 712707CF-F16B-4E9F-83BA-D5A8D812CBF5@clover.co
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Nov 13, 2020, at 11:39 AM, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> wrote:
>
> This does not show trying to connect to a database. It would help to list the commands run and then the corresponding log portions.

bash-4.4$ "/usr/pgsql-13/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D "/var/lib/pgsql/13/data" -o "-p 5432 -b -c synchronous_commit=off -c fsync=off -c full_page_writes=off -c vacuum_defer_cleanup_age=0 -c listen_addresses='' -c unix_socket_permissions=0700 -c unix_socket_directories='/var/run/postgresql'" start
waiting for server to start.... done
server started
bash-4.4$ psql postgres
psql: error: could not connect to server: FATAL: database "postgres" does not exist

---

2020-11-13 11:39:38.378 EST [205747] LOG: starting PostgreSQL 13.0 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5), 64-bit
2020-11-13 11:39:38.378 EST [205747] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2020-11-13 11:39:38.382 EST [205749] LOG: database system was shut down at 2020-11-13 11:37:34 EST
2020-11-13 11:39:38.388 EST [205747] LOG: database system is ready to accept connections
2020-11-13 11:39:45.750 EST [205756] FATAL: database "postgres" does not exist

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2020-11-13 16:52:38 Re: Problem with psprintf and intmax_t (%jd)
Previous Message Adrian Klaver 2020-11-13 16:39:12 Re: Issue upgrading from 9.5 to 13 with pg_upgrade: "connection to database failed: FATAL: database "template1" does not exist"