Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qg4p8-00EO4P-09 for pgsql-general@arkaria.postgresql.org; Tue, 12 Sep 2023 14:57:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qg4p6-009H4Y-Js for pgsql-general@arkaria.postgresql.org; Tue, 12 Sep 2023 14:57:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qg4p6-009H4N-8L for pgsql-general@lists.postgresql.org; Tue, 12 Sep 2023 14:57:04 +0000 Received: from mout.kundenserver.de ([212.227.126.187]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qg4p0-004AK7-MF for pgsql-general@lists.postgresql.org; Tue, 12 Sep 2023 14:57:02 +0000 Received: from [192.168.1.9] ([78.141.12.8]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.163]) with ESMTPSA (Nemesis) id 1M6DrU-1qmeOT3aVU-006f6P; Tue, 12 Sep 2023 16:56:53 +0200 Message-ID: <54131f54-2118-414e-9405-8ae4b1d0c56f@gemmill.name> Date: Tue, 12 Sep 2023 15:56:46 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pg_update and encoding Content-Language: en-GB To: Adrian Klaver , pgsql-general@lists.postgresql.org References: <9b639095-b92c-de7a-3c99-de4777857599@aklaver.com> From: Graeme In-Reply-To: <9b639095-b92c-de7a-3c99-de4777857599@aklaver.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:8XhBqCpWi/6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rGkoz ynHgLPv05TD7bQsw7a+LLoxBRFDu3qdL0G1gmfqoejRY3GAJeFfq7kXUJDOsD0P5zxUZne3OF gJaY11a7mqZ37gw== List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 12/09/2023 15:52, Adrian Klaver wrote: > On 9/12/23 04:49, Graeme wrote: >> Preparing to use pg_update, I used initdb to create the new >> pgsql/data, but pg_update has exited with > > I'm guessing that is actually pg_upgrade: > > https://www.postgresql.org/docs/current/pgupgrade.html > >> >> encodings for database "template1" do not match:  old "UTF8", new >> "SQL_ASCII" >> >> Should I delete pgsql/data and re-create with initdb -E "UTF8"? > > Yes for two reasons: > > 1) The upgrade will not happen. > > 2) From here: > > https://www.postgresql.org/docs/current/multibyte.html > > "The SQL_ASCII setting behaves considerably differently from the other > settings. When the server character set is SQL_ASCII, the server > interprets byte values 0–127 according to the ASCII standard, while > byte values 128–255 are taken as uninterpreted characters. No encoding > conversion will be done when the setting is SQL_ASCII. Thus, this > setting is not so much a declaration that a specific encoding is in > use, as a declaration of ignorance about the encoding. In most cases, > if you are working with any non-ASCII data, it is unwise to use the > SQL_ASCII setting because PostgreSQL will be unable to help you by > converting or validating non-ASCII characters." > >> >> Thanks, >> >> Graeme >> > Thanks, done. Data now accessible Graeme