Skip site navigation (1) Skip section navigation (2)

dblink un-named connection doesn't get re-used

From: Decibel! <decibel(at)decibel(dot)org>
To: PostgreSQL-development list <pgsql-hackers(at)postgresql(dot)org>
Subject: dblink un-named connection doesn't get re-used
Date: 2007-10-18 14:09:19
Message-ID: F680AB59-6D6F-4026-9599-1BE28880273D@decibel.org (view raw or flat)
Thread:
Lists: pgsql-hackers
Is it intentional that dblink's unnamed connections don't get re-used?

stats=# select datname, usename from pg_stat_activity;
datname | usename
---------+---------
stats   | decibel
(1 row)

stats=# select dblink_connect('dbname=stats');
dblink_connect
----------------
OK
(1 row)

stats=# select dblink_connect('dbname=postgres');
dblink_connect
----------------
OK
(1 row)

stats=# select datname, usename from pg_stat_activity;
datname  | usename
----------+----------
stats    | decibel
stats    | postgres
postgres | postgres
(3 rows)

AFAIK there's no way I could possibly use or refer to the connection  
to stats at this point; so why doesn't dblink close it when I issue  
the second connect?
-- 
Decibel!, aka Jim C. Nasby, Database Architect  decibel(at)decibel(dot)org
Give your computer some brain candy! www.distributed.net Team #1828



Responses

pgsql-hackers by date

Next:From: Pavel StehuleDate: 2007-10-18 14:09:36
Subject: Re: Proposal: generate_iterator functions
Previous:From: Tom LaneDate: 2007-10-18 13:56:38
Subject: Re: Proposal: generate_iterator functions

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group