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

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: dblink un-named connection doesn't get re-used
Дата
Msg-id 200803250007.m2P07Jh14963@momjian.us
обсуждение исходный текст
Ответ на dblink un-named connection doesn't get re-used  (Decibel! <decibel@decibel.org>)
Список pgsql-hackers
Add to TODO:

* Have /contrib/dblink reuse unnamed connections
 http://archives.postgresql.org/pgsql-hackers/2007-10/msg00895.php


---------------------------------------------------------------------------

Decibel! wrote:
> 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@decibel.org
> Give your computer some brain candy! www.distributed.net Team #1828
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://postgres.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Deprecating heap_formtuple/heap_modifytuple/heap_deformtuple
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Proposal: generate_iterator functions