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.comRegards.
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.
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