Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save barbietunnie/45501f2d950015cd54f25a13d8d68981 to your computer and use it in GitHub Desktop.
Save barbietunnie/45501f2d950015cd54f25a13d8d68981 to your computer and use it in GitHub Desktop.
How to resolve problem running post-install step during PostgreSQL 10 installation

How to resolve problem running post-install step during PostgreSQL 10 installation

  1. During installation, ensure you select a locale other than the default, say English, United States.
  2. After the installation, execute the following commands from the command line:
initdb -D "C:\Program Files\PostgreSQL\10\data" -U postgres --locale="English_United States.1252"

pg_ctl register -N postgresql-x64-10 -D "C:\Program Files\PostgreSQL\10\data"

net start postgresql-x64-10

Everything should run smoothly onwards. You can check Windows list of Services to verify that postgresql-x64-10 service is up and running

N.B: In case you run into issues with encoding, for example, you may get the error 'ERROR: character with byte sequence 0xd9 0x90 in encoding "UTF8" has no equivalent in encoding "WIN1252"', execute the following SQL query:

update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = '<the-database-name>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment