Subject: Restore Windows dump to Linux (locale issue)

From: Ertan Küçükoglu <[email-masked]>
Date: Mon, 24 Nov 2025 00:41:35 +0300

Hello,

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"

And a bunch of other errors below.

What can I do to complete this migration?

Thanks & Regards,
Ertan

---

From: Adrian Klaver <[email-masked]>
Date: Sun, 23 Nov 2025 13:47:27 -0800

> naming difference) as below

What was the complete command you gave to do the dump?

> psql:/db.dump:133: ERROR:  invalid LC_COLLATE locale name: "tr-TR"

What objects where the errors on?

-- 
Adrian Klaver
[email-masked]

---

From: Adrian Klaver <[email-masked]>
Date: Sun, 23 Nov 2025 13:49:55 -0800

> psql:/db.dump:133: ERROR:  invalid LC_COLLATE locale name: "tr-TR"

I should have added to previous post what does, in psql, the below return:

\l <database_name>