title: How many dblink connections can be opened in postgres
body: <p>As autonomus transactions are not avaliable in postgres we are using dblink as a workaroud but there is a scenerio which is as </p>
  
  <p>linked from <a href="https://stackoverflow.com/questions/25425944/postgres-supports-nested-transaction-or-autonomus-transactions-or-not">Does Postgres support nested or autonomous transactions?</a></p>
  
  <pre><code> select * from dblink_connect('TEST1','host=localhost port=5432 dbname=tyguy user=postgres password=postgres') as t1(text);
  </code></pre>
  
  <p>Then when we use the method </p>
  
  <pre><code>SELECT dblink_get_connections();
  </code></pre>
  
  <p>then only one connection is visible that is absolutely correct named as 'TEST1'</p>
  
  <p>but when i open a new pg admin window or a new session then the same is not avaliable as </p>
  
  <pre><code>SELECT dblink_get_connections();
  </code></pre>
  
  <p>returns empty. No connection of name <strong>'TEST1'</strong>  </p>
  
  <p>I am confused is DBlink is at database level ? or session level .</p>
  
  <p>if it is at session level then how many dblink named connections can be opened in a database.</p>