title: PostgreSQL first time install and attempt to connect
body: <p>I just installed postgresql-9.1.4-1-windows-x64 on a Windows 7 64 bit machine.  I'm having trouble starting the service and connecting to a database. 
  After a successful installation I've tried the following based on similar postings.</p>
  
  <p>1)  Looked for "Start Server" under Start > All Programs > PostreSQL 9.1 and could not find it.</p>
  
  <p>2)  Tried starting the server from the command line</p>
  
  <pre>
  pg_ctl.exe -D "C:\Program Files\PostgreSQL\9.1\bin\data"
  </pre>
  
  <p>This gave me the error:</p>
  
  <pre>
  could not create lock file 'postmaster.pid': Permission denied
  </pre>
  
  <p>I have administrative rights, and there is not postmaster.pid file either in the bin or data directories.</p>
  
  <p>3)  Next I tried starting the Service from Admistrative Tools by right clicking on the postgresql-9.1.4-1-windows-x64 Service and selecting Start.  I received the message:</p>
  
  <blockquote>
    <p>The postgresql-9.1.4-1-windows-x64 Service on local computer started
    and stopped.  Some services stop automatically if they are not in use
    by other services or programs.</p>
  </blockquote>
  
  <p>The Event Viewer showed the error as <code>Timed out waiting for server startup</code></p>
  
  <p>4) I figured there the data in the data directory was probably and initial database, but just in case I ran "initdb" and got:</p>
  
  <blockquote>
    <p>If you want to create a new database system either remove or empty the
    directory c:\program files\postgreSql/9.1/data or run initdb with an
    argument other than c:\program files\postgreSql/9.1/data</p>
  </blockquote>
  
  <p>4) And just for fun I Started pgAdminIII, right clicked on  "PostreSQL 9.1(localhost:5432)", selected Connect, entered password, and got:</p>
  
  <blockquote>
    <p>could not connect to server: Connection refused (0x0000274D/10061) Is
    the server running on host "localhost" (::1) and accepting TCP/IP
    connections on port 5432?</p>
  </blockquote>
  
  <p>Does anybody have a suggestion?</p>
  
  <p>Thanks.</p>