I've installed Windows 10 Fall update (1709) and now my PostgreSQL 9.5 server won't start. It worked yesterday before the update and I haven't made any changes to the configuration.
I've checked event viewer and found following error messages:
2017-10-19 11:32:32 CEST LOG: invalid value for parameter "lc_monetary": "Czech_Czech Republic.1250"
2017-10-19 11:32:32 CEST LOG: invalid value for parameter "lc_numeric": "Czech_Czech Republic.1250"
2017-10-19 11:32:32 CEST LOG: invalid value for parameter "lc_time": "Czech_Czech Republic.1250"
2017-10-19 11:32:32 CEST FATAL: configuration file "C:/Program Files/PostgreSQL/9.5/data/postgresql.conf" contains errors
It seems like Microsoft changed locale name with Fall update, I couldn't find any list of available locale names so I decided to install Postgres 10 and it confirmed my suspicion, the postgresql.conf in Postgres 10 now reads:
# These settings are initialized by initdb, but they can be changed.
lc_messages = 'Czech_Czechia.1250' # locale for system error message
# strings
lc_monetary = 'Czech_Czechia.1250' # locale for monetary formatting
lc_numeric = 'Czech_Czechia.1250' # locale for number formatting
lc_time = 'Czech_Czechia.1250' # locale for time formatting
I changed the config values for PostgreSQL 9.5 server to 'Czech_Czechia.1250' and it started ok, but the problem is that now I can't connect to any database, pgAdmin III gives me following error:
Is there a way to get the data back? I can't create dump or run pg_upgrade since the databases now have invalid locale and I can't connect to them. Maybe there is a way to change the locale of the database manually? In theory, it shouldn't cause any problems since its only different name for the same encoding.
