cancel
Showing results for 
Search instead for 
Did you mean: 

Postgresql 11 service start fails after computer restart (command line installation)

Level 3 Traveller

Postgresql 11 service start fails after computer restart (command line installation)

I try to install PostgreSQL 11.2 with the following command line on Windows 7:

postgresql-11.2-1-windows-x64.exe --mode unattended --unattendedmodeui minimal --install_runtimes 1 --serverport 5433 --servicename postgres_antserver  --superpassword postgres  --datadir C:\BlueBotics\ANTserver\Data

 

The installation is successful but when the computer restarts the postgresql service fails to start without error message. When I try manually to start the service: "net start postgres_antserver", there is no error message but it fails.

 

I observed that this problem does not exist with Windows 10, neither Windows R 2016. Any idea?

2 REPLIES 2
EDB Team Member

Re: Postgresql 11 service start fails after computer restart (command line installation)

Hi evapollard,

We have installed Postgresql 11.2 through command line on Windows 7.

Have used --install_runtimes yes as it has values yes, no (Windows only.)

The machine was restarted and the postgresql service named postgres-x64-11 was running.

 

Below is the link for reference.

https://www.enterprisedb.com/edb-docs/d/edb-postgres-advanced-server/installation-getting-started/in...

 

 

C:\>
C:\>postgresql-11.2-1-windows-x64.exe --mode unattended --unattendedmodeui minimal --install_runtimes yes --serverport 5433 --servic
ename postgres-x64-11 --superpassword postgres --datadir C:\edb\postgres\data

C:\>cd "C:\Program Files\PostgreSQL\11"\bin

C:\Program Files\PostgreSQL\11\bin>psql -p 5433 -U postgres
Password for user postgres:
psql (11.2)
WARNING: Console code page (437) differs from Windows code page (1252)
8-bit characters might not work correctly. See psql reference
page "Notes for Windows users" for details.
Type "help" for help.

postgres=# \l+
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges | Size | Table
space | Description
-----------+----------+----------+----------------------------+----------------------------+-----------------------+---------+------
------+--------------------------------------------
postgres | postgres | UTF8 | English_United States.1252 | English_United States.1252 | | 7683 kB | pg_de
fault | default administrative connection database
template0 | postgres | UTF8 | English_United States.1252 | English_United States.1252 | =c/postgres +| 7529 kB | pg_de
fault | unmodifiable empty database
| | | | | postgres=CTc/postgres | |
|
template1 | postgres | UTF8 | English_United States.1252 | English_United States.1252 | =c/postgres +| 7529 kB | pg_de
fault | default template for new databases
| | | | | postgres=CTc/postgres | |
|
(3 rows)


postgres=#

Installation Details are as below.Location is C:\Program Files\PostgreSQL\11\installation_summary


Installation Directory: C:\Program Files\PostgreSQL\11
Server Installation Directory: C:\Program Files\PostgreSQL\11
Data Directory: C:\edb\postgres\data
Database Port: 5433
Database Superuser: postgres
Operating System Account: NT AUTHORITY\NetworkService
Database Service: postgres-x64-11
Command Line Tools Installation Directory: C:\Program Files\PostgreSQL\11
pgAdmin4 Installation Directory: C:\Program Files\PostgreSQL\11\pgAdmin 4
Stack Builder Installation Directory: C:\Program Files\PostgreSQL\11\stackbuilder

===== Installation completed at: 2019-08-22(YYYY-MM-DD) - 17:54:02(HH:MM:SS) =====

Highlighted
EDB Team Member

Re: Postgresql 11 service start fails after computer restart (command line installation)

Hi evapollard,

 

If the log information is being thrown away, you may need to try starting PostgreSQL from a command line using pg_ctl.exe and specifying
the log file. Without information from the log, we would only be guessing.

 

1) Might be the issues with the permission on data directory, could you please verify appropriate permissions have been set on data directory.

2) The postgres services has admininstrator previliges.

 

Hope this helps you.