Connection Pools and DISCARD ALL

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Connection Pools and DISCARD ALL
Дата
Msg-id 1191507082.4223.115.camel@ebony.site
обсуждение исходный текст
Ответы Re: Connection Pools and DISCARD ALL  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
There's been a lively discussion on JDBC list recently about how we
handle connection pooling. This has connected a few thoughts in my head.

That's made me think about the PHP interface, which issues a BEGIN; ROLLBACK;
pair every time somebody connects to the pool.

We should have a single/consistent way of starting a new connection to
PostgreSQL when using a session pool.

As committed, DISCARD ALL does everything but cannot be issued inside a
transaction block.

I'd like to propose that DISCARD ALL also issue a ROLLBACK command if it
is issued from within a transaction block. That way whenever we reassign
a session pool connection to another agent we can just issue a single
command from all interfaces, without needing to test what the state of
the connection is beforehand.

--  Simon Riggs 2ndQuadrant  http://www.2ndQuadrant.com



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Not *quite* there on ecpg fixes
Следующее
От: Shane Ambler
Дата:
Сообщение: Re: [SQL] Why does the sequence skip a number with generate_series?