Skip to main content
The 2024 Developer Survey results are live! See the results
added 225 characters in body
Source Link
Doofus
  • 121
  • 2

Disclaimer: as this should be a standard operation, i feel something on my side must have gone terribly wrong.

I am trying to use postgresql on windows 71. The installer from edb works fine, apart from an apparently more than eight years old issue, where locale names don't match (my gut tells me windows is reporting inconsistent stuff, like it often does). When i select English, United Kingdom as locale, it fails, and goes to English_United States.1252.

As this is unchangeable after the database cluster creation, i therefore delete it, and attempt to recreate it in the same folder, fixing the locale name problem:

initdb --locale="English_United Kingdom" --lc-monetary="English_United States" -E UTF8 -U postgres -W -A scram-sha-256 -D "C:\Program Files\PostgreSQL\13\data"

Now initdb feels like security without an escape hatch is a good thing, drops priviledges it starts with, and then obviously fails to write anywhere in C:\Program Files, even when originally started as administrator.

creating directory C:/Program Files/PostgreSQL/13/data ... initdb: error: could not create directory "C:/Program Files/PostgreSQL/13/data": Permission denied

How can i reproduce, what the installer would have done, just with the proper locale? I noticed i can create the data folder, and grant full permissions to every user, then initdb works, but the resulting permissions don't look like what the installer produces at all (e.g. regarding the services user NETWORK SERVICE).


Edit: the installer executes getlocales.exe when started, so injecting a different file is difficult. The INITDBOPTS environment variable has lower priority than the installer settings, so it's not useful here.


1: yeah windows 7 is EOL i know..., but postgresql is like 30 years old, so this really shouldn't matter.

Disclaimer: as this should be a standard operation, i feel something on my side must have gone terribly wrong.

I am trying to use postgresql on windows 71. The installer from edb works fine, apart from an apparently more than eight years old issue, where locale names don't match (my gut tells me windows is reporting inconsistent stuff, like it often does). When i select English, United Kingdom as locale, it fails, and goes to English_United States.1252.

As this is unchangeable after the database cluster creation, i therefore delete it, and attempt to recreate it in the same folder, fixing the locale name problem:

initdb --locale="English_United Kingdom" --lc-monetary="English_United States" -E UTF8 -U postgres -W -A scram-sha-256 -D "C:\Program Files\PostgreSQL\13\data"

Now initdb feels like security without an escape hatch is a good thing, drops priviledges it starts with, and then obviously fails to write anywhere in C:\Program Files, even when originally started as administrator.

creating directory C:/Program Files/PostgreSQL/13/data ... initdb: error: could not create directory "C:/Program Files/PostgreSQL/13/data": Permission denied

How can i reproduce, what the installer would have done, just with the proper locale? I noticed i can create the data folder, and grant full permissions to every user, then initdb works, but the resulting permissions don't look like what the installer produces at all (e.g. regarding the services user NETWORK SERVICE).


1: yeah windows 7 is EOL i know..., but postgresql is like 30 years old, so this really shouldn't matter.

Disclaimer: as this should be a standard operation, i feel something on my side must have gone terribly wrong.

I am trying to use postgresql on windows 71. The installer from edb works fine, apart from an apparently more than eight years old issue, where locale names don't match (my gut tells me windows is reporting inconsistent stuff, like it often does). When i select English, United Kingdom as locale, it fails, and goes to English_United States.1252.

As this is unchangeable after the database cluster creation, i therefore delete it, and attempt to recreate it in the same folder, fixing the locale name problem:

initdb --locale="English_United Kingdom" --lc-monetary="English_United States" -E UTF8 -U postgres -W -A scram-sha-256 -D "C:\Program Files\PostgreSQL\13\data"

Now initdb feels like security without an escape hatch is a good thing, drops priviledges it starts with, and then obviously fails to write anywhere in C:\Program Files, even when originally started as administrator.

creating directory C:/Program Files/PostgreSQL/13/data ... initdb: error: could not create directory "C:/Program Files/PostgreSQL/13/data": Permission denied

How can i reproduce, what the installer would have done, just with the proper locale? I noticed i can create the data folder, and grant full permissions to every user, then initdb works, but the resulting permissions don't look like what the installer produces at all (e.g. regarding the services user NETWORK SERVICE).


Edit: the installer executes getlocales.exe when started, so injecting a different file is difficult. The INITDBOPTS environment variable has lower priority than the installer settings, so it's not useful here.


1: yeah windows 7 is EOL i know..., but postgresql is like 30 years old, so this really shouldn't matter.

added 163 characters in body
Source Link
Doofus
  • 121
  • 2

Disclaimer: as this should be a standard operation, i feel something on my side must have gone terribly wrong.

I am trying to use postgresql on windows 71. The installer from edb works fine, apart from an apparently more than eight years old issue, where locale names don't match (my gut tells me windows is reporting inconsistent stuff, like it often does). When i select English, United Kingdom as locale, it fails, and goes to English_United States.1252.

As this is unchangeable after the database cluster creation, i therefore delete it, and attempt to recreate it in the same folder, fixing the locale name problem:

initdb --locale="English_United Kingdom" --lc-monetary="English_United States" -E UTF8 -U postgres -W -A scram-sha-256 -D "C:\Program Files\PostgreSQL\13\data"

Now initdb feels like security without an escape hatch is a good thing, drops priviledges it starts with, and then obviously fails to write anywhere in C:\Program Files, even when originally started as administrator.

creating directory C:/Program Files/PostgreSQL/13/data ... initdb: error: could not create directory "C:/Program Files/PostgreSQL/13/data": Permission denied

How can i reproduce, what the installer would have done, just with the proper locale? I noticed i can create the data folder, and grant full permissions to every user, then initdb works, but the resulting permissions don't look like what the installer produces at all (e.g. regarding the services user NETWORK SERVICE).


1: yeah windows 7 is EOL i know..., but postgresql is like 30 years old, so this really shouldn't matter.

Disclaimer: as this should be a standard operation, i feel something on my side must have gone terribly wrong.

I am trying to use postgresql on windows 71. The installer from edb works fine, apart from an apparently more than eight years old issue, where locale names don't match (my gut tells me windows is reporting inconsistent stuff, like it often does). When i select English, United Kingdom as locale, it fails, and goes to English_United States.1252.

As this is unchangeable after the database cluster creation, i therefore delete it, and attempt to recreate it in the same folder, fixing the locale name problem:

initdb --locale="English_United Kingdom" --lc-monetary="English_United States" -E UTF8 -U postgres -W -A scram-sha-256 -D "C:\Program Files\PostgreSQL\13\data"

Now initdb feels like security without an escape hatch is a good thing, drops priviledges it starts with, and then obviously fails to write anywhere in C:\Program Files, even when originally started as administrator.

How can i reproduce, what the installer would have done, just with the proper locale? I noticed i can create the data folder, and grant full permissions to every user, then initdb works, but the resulting permissions don't look like what the installer produces at all (e.g. regarding the services user NETWORK SERVICE).


1: yeah windows 7 is EOL i know..., but postgresql is like 30 years old, so this really shouldn't matter.

Disclaimer: as this should be a standard operation, i feel something on my side must have gone terribly wrong.

I am trying to use postgresql on windows 71. The installer from edb works fine, apart from an apparently more than eight years old issue, where locale names don't match (my gut tells me windows is reporting inconsistent stuff, like it often does). When i select English, United Kingdom as locale, it fails, and goes to English_United States.1252.

As this is unchangeable after the database cluster creation, i therefore delete it, and attempt to recreate it in the same folder, fixing the locale name problem:

initdb --locale="English_United Kingdom" --lc-monetary="English_United States" -E UTF8 -U postgres -W -A scram-sha-256 -D "C:\Program Files\PostgreSQL\13\data"

Now initdb feels like security without an escape hatch is a good thing, drops priviledges it starts with, and then obviously fails to write anywhere in C:\Program Files, even when originally started as administrator.

creating directory C:/Program Files/PostgreSQL/13/data ... initdb: error: could not create directory "C:/Program Files/PostgreSQL/13/data": Permission denied

How can i reproduce, what the installer would have done, just with the proper locale? I noticed i can create the data folder, and grant full permissions to every user, then initdb works, but the resulting permissions don't look like what the installer produces at all (e.g. regarding the services user NETWORK SERVICE).


1: yeah windows 7 is EOL i know..., but postgresql is like 30 years old, so this really shouldn't matter.

Source Link
Doofus
  • 121
  • 2

Installing postgres on windows with locale

Disclaimer: as this should be a standard operation, i feel something on my side must have gone terribly wrong.

I am trying to use postgresql on windows 71. The installer from edb works fine, apart from an apparently more than eight years old issue, where locale names don't match (my gut tells me windows is reporting inconsistent stuff, like it often does). When i select English, United Kingdom as locale, it fails, and goes to English_United States.1252.

As this is unchangeable after the database cluster creation, i therefore delete it, and attempt to recreate it in the same folder, fixing the locale name problem:

initdb --locale="English_United Kingdom" --lc-monetary="English_United States" -E UTF8 -U postgres -W -A scram-sha-256 -D "C:\Program Files\PostgreSQL\13\data"

Now initdb feels like security without an escape hatch is a good thing, drops priviledges it starts with, and then obviously fails to write anywhere in C:\Program Files, even when originally started as administrator.

How can i reproduce, what the installer would have done, just with the proper locale? I noticed i can create the data folder, and grant full permissions to every user, then initdb works, but the resulting permissions don't look like what the installer produces at all (e.g. regarding the services user NETWORK SERVICE).


1: yeah windows 7 is EOL i know..., but postgresql is like 30 years old, so this really shouldn't matter.