tag:help.appveyor.com,2012-11-13:/discussions/problems/27497-build-stalls-after-starting-postgresql-serverAppVeyor: Discussion 2020-08-10T21:02:56Ztag:help.appveyor.com,2012-11-13:Comment/483871382020-06-08T23:03:34Z2020-06-08T23:03:34ZBuild stalls after starting PostgreSQL server<div><p>I think you should run the server as a async process, otherwise it will be blocking the build. It could be done with PS, for example:</p>
<pre>
<code>- ps: Start-Process -FilePath pg_ctl -ArgumentList "-D","$env:PGROOT\data","start"</code>
</pre></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/483871382020-06-09T07:02:57Z2020-06-09T07:02:57ZBuild stalls after starting PostgreSQL server<div><p>It does not seem to work. I get the output<br>
psql: error: could not connect to server: could not connect to server: Connection refused (0x0000274D/10061)<br>
Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x0000274D/10061)<br>
Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432? when I try to connect to postgres server.</p></div>kartikohri13tag:help.appveyor.com,2012-11-13:Comment/483871382020-06-09T17:22:42Z2020-06-09T17:22:42ZBuild stalls after starting PostgreSQL server<div><p>Why not to just use <code>net start postgresql-x64-12</code> to start PGSql?</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/483871382020-06-09T17:30:44Z2020-06-09T17:30:44ZBuild stalls after starting PostgreSQL server<div><p>I was initially using net start but it causes a permissions error when I<br>
try to access certain files. After starting postgres servers, I build a<br>
java plugin for the server and install it into the server. The plugin needs<br>
access to jvm.dll inside the java installation directory. I get an access<br>
denied error when the plugin tries to access jvm.dll. But this issue does<br>
not occur when I use pg_ctl to start the server. So, I want to use pg_ctl.</p></div>kartikohri13tag:help.appveyor.com,2012-11-13:Comment/483871382020-06-10T02:17:09Z2020-06-10T02:17:09ZBuild stalls after starting PostgreSQL server<div><p>Try <a href="https://www.appveyor.com/docs/how-to/rdp-to-build-worker/">logging in to build VM via RDP</a> and experiment with the correct filepath/arguments for <code>Start-Process</code>. I feel it could be a path issue or something else very obvious.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/483871382020-06-10T12:14:31Z2020-06-10T12:14:31ZBuild stalls after starting PostgreSQL server<div><p>Thanks for the tip. The arguments needed be escaped in order for the process to work.</p></div>kartikohri13tag:help.appveyor.com,2012-11-13:Comment/483871382020-06-10T19:25:50Z2020-06-10T19:25:50ZBuild stalls after starting PostgreSQL server<div><p>Cool, thanks for the update!</p></div>Feodor Fitsner