Restart PostgreSQL service with SSL and private key pass phrase

From: sri bhav <sri_bhav(at)hotmail(dot)com>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Restart PostgreSQL service with SSL and private key pass phrase
Date: 2017-11-17 21:19:05
Message-ID: CY4PR11MB1304B99F42197A0A241A52B9E52F0@CY4PR11MB1304.namprd11.prod.outlook.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

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Neto pr 2017-11-18 02:11:49 POWA-tool doesn't show queries executed
Previous Message Don Seiler 2017-11-17 17:35:23 Re: FATAL: invalid value for parameter "TimeZone" after upgrade from 9.2 to 9.6