On 06/06/20 08:40, Kartik Ohri wrote:
> The solution is to use *pg_ctl* to start the postgres server from a shell
> with appropriate permissions. Earlier, I was trying to start the postgres
> server using *net start *in CMD and *Start-Service* in PowerShell. Even
> with privileged shells, postgres created using these commands do not have
> the necessary rights to some directories (including the Java directory,
> hence, the libjvm location error). I was unable to figure out why this
> happens.
Interesting! There are a bunch of #ifdef WIN32 sections in pg_ctl.c [1],
maybe some useful info in there.
Regards,
-Chap
[1]
https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/bin/pg_ctl/pg_ctl.c;hb=HEAD