Re: start/restart PostgreSQL service with SSL enabled

From: "Ponnam, Bhavani" <Bhavani(dot)Ponnam(at)Stryker(dot)com>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: start/restart PostgreSQL service with SSL enabled
Date: 2017-10-05 19:52:53
Message-ID: DM5PR01MB2731C942883BB83C91AC278C83700@DM5PR01MB2731.prod.exchangelabs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,
I currently have PostgreSQL 9.5 installed on a Windows 10 machine. I have enabled SSL and configured key & crt files with pass phrase. I know that I have to enter the PEM pass phrase everytime I try to restart. So I tried using pg_ctl to start Postgres, but I have few issues:

1. Since I installed Postgres as Windows service, running pg_ctl does not start my service. I see postgresql exe instances running in Task manager but my windows service never gets updated to Running.
2. After running the following command:

pg_ctl -D "c:\Program Files\PostgreSQL\9.5\data" restart -w

I was able to enter the PEM pass phrase since I got a prompt and was able to connect. But when my application is trying to establish the connection with Postgresql, the application is waiting since there are prompts on the command windows where I executed the pg_ctl command to enter the PEM pass phrase. I think this makes the application totally unusable.

1. Per our security requirements, we cannot remove the PEM pass phrase, so how do I control the PostgreSQL service - start & restart with the pass phrase and without user interaction.

Please advise on how to achieve what I am doing or share any alternatives that someone already has for this situation.

Thank you

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message ghiureai 2017-10-06 18:03:34 PG 10 streaming replication with repmgr basic cfg Q
Previous Message Ponnam, Bhavani 2017-10-05 19:43:10 start/restart PostgreSQL service with SSL enabled