Re: Support Parallel Query Execution in Executor

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: Support Parallel Query Execution in Executor
Дата
Msg-id 20060411205456.GV49405@pervasive.com
обсуждение исходный текст
Ответ на Re: Support Parallel Query Execution in Executor  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
On Mon, Apr 10, 2006 at 01:36:45PM -0400, Alvaro Herrera wrote:
> Markus Schiltknecht wrote:
> > On Mon, 2006-04-10 at 17:22 +0800, Qingqing Zhou wrote:
> > > Check the code InitPostgres(). These global varaibles are scattered in many
> > > places, so I am not sure if it is easy to write clean code to clear up these
> > > variables. But if you can come up with a patch to do reconnect without
> > > disconnect, that will be cool.
> > 
> > Yes, that's where I've been playing around already. Not with much
> > success until now, though. :-(
> 
> An idea arising in chat with Joshua Drake:  the retargetting code, if it
> turns out to work and not be excessively expensive, could also be useful
> to implement a server-side "connection pooling" of sorts: the postmaster
> could keep idle backends and retarget them to a database that receives
> an incoming connection.  However, we'd also need a mechanism to clean
> all backend state previous to reusing a connection, to leave it "as
> new" (no prepared statements, WITH HOLD cursors, etc.)

Oracle allows you to essentially re-connect to an existing connection by
saving connection state when a connection goes back to the connection
pool. Essentially, you connect, and then re-authenticate as a different
user. That user has a specific environment associated with it which is
then pulled in. This makes it reasonable to use Oracle's built-in code
for handling permissions, etc; you just give each system user a database
account. While this sounds scary to folk that haven't used it, it's
actually safer than rolling your own authentication and security
mechanism (which will likely have bugs in it) and having your middleware
connect to the database with some dedicated account.
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461


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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: plpgsql by default
Следующее
От: Tom Lane
Дата:
Сообщение: Re: plpgsql by default