title: Setup/Running PostgreSQL From C#
body: <p>My requirements are as follows:</p>
  
  <ol>
  <li>Once the application starts the PostgreSQL service will be started by the application</li>
  <li>Once the application closes the PostgreSQL service will be closed by the application</li>
  <li>... so i will be taking care of the PostgreSQL setup and running the scripts and starting the service etc</li>
  </ol>
  
  <p>How i am doing this at present is:</p>
  
  <ol>
  <li>when i start PostgreSQL in a new process i am redirecting the <code>RedirectStandardError</code> and <code>RedirectStandardOutput</code>, it is a silent start, user cannot see the command window etc</li>
  </ol>
  
  <h2>The problem is,</h2>
  
  <ul>
  <li>When I coded this I looked for message strings and only supported English. In other words, I used to look for the string <code>success</code> in <code>RedirectStandardOutput</code> but now we are supporting <strong>multiple languages</strong> so the comparison fails.</li>
  </ul>
  
  <p>Is there any way i can find out whether PostgreSQL set up was successfully started and PostgreSQL service is running or not?</p>
  
  <p>I am starting PostgreSQL by calling pg_ctl.exe in separate process.</p>