Re: disabling seq scans

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: disabling seq scans
Дата
Msg-id 17602.1080879381@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: disabling seq scans  ("Marcus Andree S. Magalhaes" <marcus.magalhaes@vlinfo.com.br>)
Список pgsql-jdbc
"Marcus Andree S. Magalhaes" <marcus.magalhaes@vlinfo.com.br> writes:
> But, since we're using pooled connections, we must be extra
> careful and ensure all connections have the enable_seqscan
> reset to its default.

If you are concerned about failing to reset parameters, use "SET LOCAL
foo" instead of plain "SET foo" (and of course, do this inside a
transaction block).  With the LOCAL option the parameter is guaranteed
to be reset at transaction end.

> Do the pooling system resets the "enable_seqscan" variable
> when the connections are delivered to the clients or we
> *must* do it ourselves?

I think it is reasonable to expect a pooling system to deliver you a
fresh transaction.  It is not reasonable to expect it to go and issue
explicit SET commands to undo things you've done.

            regards, tom lane

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

Предыдущее
От: "Sanjay Singh"
Дата:
Сообщение: Un-register
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: patch: enforce the requirements for scrollable resultsets