Re: Issue upgrading from 9.5 to 13 with pg_upgrade: "connection to database failed: FATAL: database "template1" does not exist" - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Issue upgrading from 9.5 to 13 with pg_upgrade: "connection to database failed: FATAL: database "template1" does not exist"
Date
Msg-id dd3870f1-a17d-3658-1b6f-8290d6e35b78@aklaver.com
Whole thread Raw
In response to Re: Issue upgrading from 9.5 to 13 with pg_upgrade: "connection to database failed: FATAL: database "template1" does not exist"  (Jeremy Wilson <jwilson@clover.co>)
Responses Re: Issue upgrading from 9.5 to 13 with pg_upgrade: "connection to database failed: FATAL: database "template1" does not exist"  (Jeremy Wilson <jwilson@clover.co>)
List pgsql-general
On 11/13/20 8:40 AM, Jeremy Wilson wrote:
> 
> 
>> On Nov 13, 2020, at 11:39 AM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
>>
>> This does not show trying to connect to a database. It would help to list the commands run and then the
correspondinglog 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.120191121 (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
> 


Hmm. You can still connect if you use?:

/usr/pgsql-13/bin/pg_ctl -D /var/lib/pgsql/13/data/ -l logfile start

If so that would to me point to one of the options in the -o string. I 
would try dropping/changing them one at a time to see what happens. I 
would say start with the items in the  "-c synchronous_commit=off -c 
fsync=off -c full_page_writes=off" section.

-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Jeremy Wilson
Date:
Subject: Re: Issue upgrading from 9.5 to 13 with pg_upgrade: "connection to database failed: FATAL: database "template1" does not exist"
Next
From: Jeremy Wilson
Date:
Subject: Re: Issue upgrading from 9.5 to 13 with pg_upgrade: "connection to database failed: FATAL: database "template1" does not exist"