0

As autonomus transactions are not avaliable in postgres we are using dblink as a workaroud but there is a scenerio which is as

linked from Does Postgres support nested or autonomous transactions?

 select * from dblink_connect('TEST1','host=localhost port=5432 dbname=tyguy user=postgres password=postgres') as t1(text);

Then when we use the method

SELECT dblink_get_connections();

then only one connection is visible that is absolutely correct named as 'TEST1'

but when i open a new pg admin window or a new session then the same is not avaliable as

SELECT dblink_get_connections();

returns empty. No connection of name 'TEST1'

I am confused is DBlink is at database level ? or session level .

if it is at session level then how many dblink named connections can be opened in a database.

Community
  • 1
  • 1
SarthAk
  • 1,628
  • 3
  • 19
  • 24
  • the documentation of dblink (http://www.postgresql.org/docs/current/static/dblink.html) states at the end, that ist will operate at session level. – ralf.w. Feb 19 '15 at 07:32
  • @ralf.w since there will be many applications using this could we can give a estimate that how many max connection could be made throgh dblink in a database – SarthAk Feb 19 '15 at 11:48

0 Answers0