Re: [Patch] Data type cache to speed up query tool

From: Dave Page <dpage(at)pgadmin(dot)org>
To: aiht <aihtdikh(at)gmail(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [Patch] Data type cache to speed up query tool
Date: 2012-11-26 13:26:47
Message-ID: CA+OCxowHwAN1LpJOGtekxr374LVtHeqOOWOwNxqXDmu9wUtA-Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi

On Mon, Nov 26, 2012 at 1:12 AM, aiht <aihtdikh(at)gmail(dot)com> wrote:
>
>
>>> * When a pgConn is Duplicate()d, its cache is copied for the new
>>> connection
>>> to use, but as far as I can see this is only called when doing File->New
>>> Window in the query tool. If more pgConns are constructed by Duplicate()
>>> then caching may be more efficient.
>>
>> Not so sure about that, as mentioned above.
>
> Yeah, now that I've looked closer it doesn't seem so easy to Duplicate()
> other connections. It seems safe in the query tool because the new window
> uses the same host/db/etc. But perhaps I am missing some points about e.g.
> schema search paths?

It should be safe - we're only duplicating the connection parameters
and then opening a new connection with them. We're not copying session
state or anything like that.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Magnus Hagander 2012-11-26 16:37:36 pgAdmin III commit: Fix incorrect JOIN in query to list databases
Previous Message aiht 2012-11-26 01:12:39 Re: [Patch] Data type cache to speed up query tool