Re: Restore Windows dump to Linux (locale issue) - Mailing list pgsql-general

From Tom Lane
Subject Re: Restore Windows dump to Linux (locale issue)
Date
Msg-id 811312.1763935324@sss.pgh.pa.us
Whole thread Raw
In response to Restore Windows dump to Linux (locale issue)  (Ertan Küçükoglu <ertan.kucukoglu@gmail.com>)
Responses Re: Restore Windows dump to Linux (locale issue)
List pgsql-general
=?UTF-8?B?RXJ0YW4gS8O8w6fDvGtvZ2x1?= <ertan.kucukoglu@gmail.com> writes:
> I am using PostgreSQL 18.1 on a Windows system.
> I need to move that database to a Linux system of the same version number.
> Windows system use locales name as tr-TR (this is UTF-8 locale)
> Linux system use locale name as tr_TR.UTF-8
> My cluster backup gives error at restore (I think because of that locale
> naming difference) as below
> psql:/db.dump:133: ERROR:  invalid LC_COLLATE locale name: "tr-TR"

Edit the dump so that the databases are created with Linux-compatible
locale names.  You should find lines like

CREATE DATABASE foo WITH TEMPLATE = template0 ENCODING = 'UTF-8' LOCALE_PROVIDER = libc LOCALE = 'tr-TR';

(details will vary depending on PG version) and changing the locale
strings ought to do the trick.

If the dump file is too big for your editor, consider splitting it
into schema-only and data-only dumps.

            regards, tom lane



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Restore Windows dump to Linux (locale issue)
Next
From: Brent Wood
Date:
Subject: Re: Restore Windows dump to Linux (locale issue)