Re: could not determine encoding for locale "et_EE.UTF-8": codeset is "CPUTF-8" in pg_restore

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Andrus <kobruleht2(at)hot(dot)ee>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: could not determine encoding for locale "et_EE.UTF-8": codeset is "CPUTF-8" in pg_restore
Date: 2020-03-30 16:09:24
Message-ID: e428f077-29d8-b8d1-bff7-b028c6133a49@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 3/29/20 2:47 PM, Andrus wrote:
> Hi!
>
>>> Same warning appears two times. This command execute by pg_restore
>>> probably causes this (harmless?)  warning:
>> What warning?
>
> pg_restore: WARNING:  could not determine encoding for locale
> "et_EE.UTF-8":
> codeset is "CPUTF-8"
>
>> I cranked up a Windows 7 instance and tried to migrate a Postgres 11
>> database from Ubuntu and it failed on the CREATE DATABASE step because
>> of this line in the dump file:
>> CREATE DATABASE redmine WITH TEMPLATE = template0 ENCODING = 'UTF8'
>> LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8';
>
> I ran this statemnt it in Windows 10 with Postgres 12 successfully.
> Result was:
>
> WARNING:  could not determine encoding for locale "en_US.UTF-8": codeset
> is "CPUTF-8"
> WARNING:  could not determine encoding for locale "en_US.UTF-8": codeset
> is "CPUTF-8"
> CREATE DATABASE
>
> Query returned successfully in 1 secs 75 msec.
>
> redmine database was created. I dont understand why it failed in your test.

Not sure but:

1) I was on Windows 7

2) Using Postgres 11

3) My Windows skills have atrophied, especially with the Windows command
line.

>
>> When I manually changed it in the plain text version of the dump file to:
>> CREATE DATABASE redmine WITH TEMPLATE = template0 ENCODING = 'UTF8'
>> LC_COLLATE = 'English_United States.1252' LC_CTYPE = 'English_United
>> States.1252';
>
> I verifed that data was restored using pg_restore without manually
> changing anything.

So was this the same for the database you originally posted about, it
actually restored it just threw warnings?

If so I misunderstood the situation and thought the database was not
loading.

>
> Andrus.
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dummy Account 2020-03-30 17:46:57 pgAdmin4 installation on macOS installed a User: can I delete it?
Previous Message Adrian Klaver 2020-03-30 16:01:24 Re: Hot standby from Debian to Windows