title: PostgreSQL fails to start on Windows XP
body: <p>I am attempting to set up a Windows XP Test Agent running Ruby on Rails against a PostgreSQL Database. I've installed PostgreSQL 9.2 for Windows, with default settings. However, when I attempt to start the service from the Service Control Panel, the following error message appears(irrelevantly of which User I attempt to set it to):</p>
  
  <pre><code>   The postgres-9.2 -PostgreSQL Server 9.2 service on Local Computer started and then stopped. Some services 
     stop automatically if they have work to do, for example, the Performance Logs and Alerts service.
  </code></pre>
  
  <p>If I attempt to launch it from the command line (whether cmd.exe or git bash doesn't matter with):</p>
  
  <pre><code>   E:\PostgreSQL\9.2\bin\pg_ctl.exe start  -D E:\PostgreSQL\9.2\data
  </code></pre>
  
  <p>It will claim:</p>
  
  <pre><code>   server starting
  </code></pre>
  
  <p>However it will fail to start (rake db:migrate will report the server as not running, the postgresql process is missing from Task Manager, the Service is listed as down in the Service List, and </p>
  
  <pre><code>  E:\PostgreSQL\9.2\bin\pg_ctl.exe stop  -D E:\PostgreSQL\9.2\data
  </code></pre>
  
  <p>Will report</p>
  
  <pre><code>  pg_ctl: PID file "E:/PostgreSQL/9.2/data/postmaster.pid" does not exist Is server running?
  </code></pre>
  
  <p>While attempting to start it as a server through pg_ctl:</p>
  
  <pre><code>  E:\PostgreSQL\9.2\bin\pg_ctl.exe runservice  -D E:\PostgreSQL\9.2\data
  </code></pre>
  
  <p>Fails with:</p>
  
  <pre><code>  pg_ctl: could not start service PostgreSQL: error code 1063
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>the contents of pg_hba:</p>
  
  <pre><code> # TYPE  DATABASE        USER            ADDRESS                 METHOD
   local   all             all                all                  trust
   # IPv4 local connections:
   host    all             all                all                  trust
   host    all             all             127.0.0.1/32            trust
   # IPv6 local connections:
   #host    all             all             ::1/128                trust
   # Allow replication connections from localhost, by a user with the
   # replication privilege.
   #host    replication     all                all                 trust
   #host    replication     postgres        127.0.0.1/32           trust
   #host    replication     postgres        ::1/128                trust
  </code></pre>
  
  <p>Checking in pg_log as per comments below:</p>
  
  <pre><code> 2012-10-28 22:47:44 PDT LOG:  local connections are not supported by this build
   2012-10-28 22:47:44 PDT CONTEXT:  line 78 of configuration file "E:/PostgreSQL/9.2/data/pg_hba.conf"
   2012-10-28 22:47:44 PDT FATAL:  could not load pg_hba.conf
  </code></pre>
  
  <p>Line 78 is </p>
  
  <pre><code> local   all             all                all                  trust
  </code></pre>
  
  <p>The same error still occurs when running as a service (whether through pg_ctl runservice or from the services control panel). However pg_ctl start now starts postgres without incident.</p>
  
  <p>I'll go with "good enough"</p>
  
  <p>PS: The Event Log entries merely say "Timed out waiting for server startup"</p>