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:19:16
Message-ID: 12B3647B-5BE0-4CDA-9EC8-317AB59810CB@clover.co
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Nov 13, 2020, at 11:06 AM, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> wrote:
>
> When you manually run the pg_upgrade pg_ctl script the server starts but you cannot connect to any database in it correct?

Yes.

> What does pg_upgrade_server.log show when you do above?

-----------------------------------------------------------------
pg_upgrade run on Fri Nov 13 10:11:45 2020
-----------------------------------------------------------------

command: "/usr/pgsql-9.5/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D "/var/lib/pgsql/9.5/data" -o "-p 54320 -b -c listen_addresses='' -c unix_socket_permissions=0700 -c unix_socket_directories='/var/run/postgresql'" start >> "pg_upgrade_server.log" 2>&1
waiting for server to start....2020-11-13 10:11:46 EST [204620]: [1-1] user=,db=,app=,client= LOG: ending log output to stderr
2020-11-13 10:11:46 EST [204620]: [2-1] user=,db=,app=,client= HINT: Future log output will go to log destination "syslog".
done
server started

command: "/usr/pgsql-9.5/bin/pg_ctl" -w -D "/var/lib/pgsql/9.5/data" -o "" -m smart stop >> "pg_upgrade_server.log" 2>&1
waiting for server to shut down.... done
server stopped

command: "/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 >> "pg_upgrade_server.log" 2>&1
waiting for server to start....2020-11-13 10:11:54.944 EST [204724] LOG: redirecting log output to logging collector process
2020-11-13 10:11:54.944 EST [204724] HINT: Future log output will appear in directory "log".
done
server started

command: "/usr/pgsql-13/bin/pg_ctl" -w -D "/var/lib/pgsql/13/data" -o "" -m smart stop >> "pg_upgrade_server.log" 2>&1
waiting for server to shut down....................... done
server stopped

command: "/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 >> "pg_upgrade_server.log" 2>&1
waiting for server to start....2020-11-13 10:12:15.902 EST [204782] LOG: redirecting log output to logging collector process
2020-11-13 10:12:15.902 EST [204782] HINT: Future log output will appear in directory "log".
done
server started

command: "/usr/pgsql-13/bin/pg_ctl" -w -D "/var/lib/pgsql/13/data" -o "" -m fast stop >> "pg_upgrade_server.log" 2>&1
waiting for server to shut down.... done
server stopped

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jan Behrens 2020-11-13 16:22:06 Problem with psprintf and intmax_t (%jd)
Previous Message Jeremy Wilson 2020-11-13 16:18:14 Re: Issue upgrading from 9.5 to 13 with pg_upgrade: "connection to database failed: FATAL: database "template1" does not exist"