Re: BUG #18196: Databases Created in Turkish Language Will Not Run on the Latest Version of Windows

From: Halil Han Badem <halilhanbadem(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18196: Databases Created in Turkish Language Will Not Run on the Latest Version of Windows
Date: 2023-11-15 19:06:36
Message-ID: CA+hfYg_4-jYTjdHNKyvfaaDvY9YVHqeN5euDjhaBBioCAxTNFQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The more significant issue here is that PostgreSQL does not allow
connections because, during installation, it was created with the
Turkish_Turkey.1254 option. I attempted to connect to the PostgreSQL user
using psql via the command line to take a backup, but it didn't even allow
a connection to the main database (postgres). The error it provided is
again as follows:

failed: FATAL: database locale is incompatible with the operating system
DETAIL: The database was initialized with LC_COLLATE "Turkish_Turkey.1254",
which is not recognized by setlocale(). HINT: Recreate the database with
another locale or install the missing locale.

In this section, there are two definite solutions. The first one is the
solution I explained [1], and the second one is to uninstall the Windows
Update. However, removing this update will not be a permanent solution
because, eventually, a Windows Update will be received for security or any
dependency reasons.

[1]
https://www.postgresql.org/message-id/CA%2BhfYg-rGc-O_LnS5M59HGbYufaGsQ6Sc4yBKucBQZLhoZE_7w%40mail.gmail.com

Regards.

Halil Han Badem <halilhanbadem(at)gmail(dot)com>, 15 Kas 2023 Çar, 21:47 tarihinde
şunu yazdı:

> In this case, the service starts, but you cannot establish a connection to
> the database. In other words, it gives the following error. This error is
> expected because the database was created with Turkish_Turkey.1254. Due to
> the name change to Turkish_Türkiye.1254, it cannot find the local name.
>
> failed: FATAL: database locale is incompatible with operating system
> DETAIL: The database was initialized with LC_COLLATE "Turkish_Turkey.1254",
> which is not recognized by setlocale(). HINT: Recreate the database with
> another locale or install the missing locale.
>
> Regards,
> Halil Han.
>
> Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, 15 Kas 2023 Çar, 21:29 tarihinde
> şunu yazdı:
>
>> On Wed, 2023-11-15 at 21:11 +0300, Halil Han Badem wrote:
>> > 7. Later, in the Windows Event Logs, you will see the error
>> > "FATAL: configuration file "C:/Program
>> Files/PostgreSQL/15/data/postgresql.conf" contains errors."
>> > 8. The cause of the error in this file is the values specified as
>> > lc_messages, lc_monetary, lc_numeric, lc_time under
>> Turkish_Turkey.1254.
>> > This is because, with the new update, Turkish_Turkey.1254 is no
>> longer
>> > present in the Windows operating system; the correct locale name is
>> > now Turkish_Türkiye.1254.
>>
>> If you edit "postgresql.conf" and change all occurrences of
>> "Turkish_Turkey.1254"
>> to "Turkish_Türkiye.1254", can you start the service?
>> If yes, can you connect to a Turkish database?
>>
>> Yours,
>> Laurenz Albe
>>
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Halil Han Badem 2023-11-15 19:10:28 Re: BUG #18196: Databases Created in Turkish Language Will Not Run on the Latest Version of Windows
Previous Message Pavel Stehule 2023-11-15 19:02:55 Re: BUG #18196: Databases Created in Turkish Language Will Not Run on the Latest Version of Windows