Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kddiw-00079B-Ew for pgsql-general@arkaria.postgresql.org; Fri, 13 Nov 2020 18:23:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kddbH-0002Zq-0V for pgsql-general@arkaria.postgresql.org; Fri, 13 Nov 2020 18:15:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kddbF-0002Yq-JP for pgsql-general@lists.postgresql.org; Fri, 13 Nov 2020 18:15:06 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kddb8-0003uK-Le for pgsql-general@lists.postgresql.org; Fri, 13 Nov 2020 18:15:04 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id E5CF8B26; Fri, 13 Nov 2020 13:14:55 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Fri, 13 Nov 2020 13:14:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=N FoTnV4Wpx2z3/9YI+9AminZVypHLHmNchk1HUrFb1c=; b=TyU7fAivxtKFSJ/Mq pIyA/d7zoQVpubjiNDRGn+/uF5o+A1Y0dCibC9+PJJ5ABxMyUZECtLyKP4wAa+zw SEK5u52Dq9exvgVUDjvjND3sVcVuFnPdnQapu+1SvCfBOhaOp473B03dZ/FFm2PT rlgKQ9l/4slwFXqpmn2b2b3GnlSn4iOmwFjiAPDrVcoNCS/iy/F5zPUodKR7uLjV a8rSudu5qAmGsmqSiVWPtKuhWIv+saYKSVB+D1cM5iWUDa9gdXmF2E2wUThG9MC6 kWNABZ0byBreIpFq/v10g0AhdEEXDsPV8hI59OKYihszrB0Cgq/VqT+K+DbRQkXH XvIEA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=NFoTnV4Wpx2z3/9YI+9AminZVypHLHmNchk1HUrFb 1c=; b=aZ8C78uwvurrWJV0Y7Ao18ouN99D8TSCXw2VitOs8GyXHCBwSMvwGr6KZ DqjoaTq3UrGwxOkGV5FXM+/26qQziaPXlqRKdrUDDEqBU0LFpSZi1pw3jnshmy3T XK7HlpLbQaYlxMUWZcu79Byfi1pYg96IhJb3e6IP8rKan3fEnqh1R/uNZqHujjfd hVPBXoCOqsuvhIr6h0Q+40Y1XE7dWj/SVGvMUewZmqwBAtHUVQIvchW0dmYH8sjf Int9uLlAfR3rLJx2eoGsTqDfuvfk7t9J1iU6Gs7344E2XosA1Ndo18CwmsSM2uK1 BzaN+k/jr7jm0/oFIibP3xHKGi5tg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddvhedguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhepveetjedtieekteefhffhhfetledvkeffvedugeej ueekhffgvdeileeitdekvefhnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrgh enucfkphepjeegrdelgedrjeefrddvvddvnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrh drtghomh X-ME-Proxy: Received: from ranger.suse (unknown [74.94.73.222]) by mail.messagingengine.com (Postfix) with ESMTPA id 6BB783064AAA; Fri, 13 Nov 2020 13:14:54 -0500 (EST) Subject: Re: Issue upgrading from 9.5 to 13 with pg_upgrade: "connection to database failed: FATAL: database "template1" does not exist" To: Jeremy Wilson Cc: Tom Lane , pgsql-general@lists.postgresql.org References: <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> <1F006B57-B6A3-40B0-B92D-C31BAEF52CA1@clover.co> <12B3647B-5BE0-4CDA-9EC8-317AB59810CB@clover.co> <58943bf6-edf8-b5f2-8888-e5595a712ec2@aklaver.com> <7C14FAD0-775D-4F13-8E3C-97B66284BFFC@clover.co> <38423984-6dfd-b243-316c-6c8391d68959@aklaver.com> <7B8F6746-E0E5-48DD-B3EF-E4A520838C11@clover.co> <712707CF-F16B-4E9F-83BA-D5A8D812CBF5@clover.co> <66607949-765D-4BAD-97A6-21DAE8B535EE@clover.co> From: Adrian Klaver Message-ID: Date: Fri, 13 Nov 2020 10:14:53 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <66607949-765D-4BAD-97A6-21DAE8B535EE@clover.co> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 11/13/20 9:12 AM, Jeremy Wilson wrote: > > >> On Nov 13, 2020, at 12:06 PM, Adrian Klaver wrote: >> >> Hmm. You can still connect if you use?: >> >> /usr/pgsql-13/bin/pg_ctl -D /var/lib/pgsql/13/data/ -l logfile start > > Same result. > > bash-4.4$ /usr/pgsql-13/bin/pg_ctl -D /var/lib/pgsql/13/data/ -l logfile 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 > In this post: https://www.postgresql.org/message-id/793E4164-90E9-41F0-B74C-129E1DB76408%40clover.co it worked. Though in that case pg_upgrade was not run before you ran: /usr/pgsql-13/bin/pg_ctl -D /var/lib/pgsql/13/data/ -l logfile start Can you start with clean initdb and then run above command to see if you can connect. Then run: /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/lib/pgsql'" start and see if you can connect. Leave pg_upgrade out of the mix to see if it is indeed the issue. -- Adrian Klaver adrian.klaver@aklaver.com