Re: Implicit autocommit?

Поиск
Список
Период
Сортировка
От Eric Faulhaber
Тема Re: Implicit autocommit?
Дата
Msg-id 469A5AA6.3090005@goldencode.com
обсуждение исходный текст
Ответ на Re: Implicit autocommit?  (Oliver Jowett <oliver@opencloud.com>)
Ответы Re: Implicit autocommit?
Список pgsql-jdbc
Oliver Jowett wrote:
> Eric Faulhaber wrote:
>
>> I debugged into the driver and found it was issuing a "BEGIN" to the
>> backend just before each statement.  Why would it do this with
>> autocommit disabled?
>
> autocommit on = implicit transaction wrapping each individual
> statement. In the postgres world, this means "don't use BEGIN/COMMIT
> at all".
>
> autocommit off = explicit transaction demarcation, the first statement
> executed starts a new transaction that lasts until rollback()/commit()
> are called. In the postgres world, this means "use
> BEGIN/ROLLBACK/COMMIT to demarcate the transaction". So the driver
> issues a BEGIN to start a new transaction as necessary.
>
> -O
Unless I misunderstand your answer, this suggests that vacuum cannot be
run via JDBC, since it cannot be run within a transaction block.  It is
my understanding that autovacuum skips temp tables:

http://archives.postgresql.org/pgsql-general/2007-06/msg01645.php

This is consistent with my experience.  So, how can I vacuum a
long-lived temp table created with a JDBC connection?

Thanks,
Eric Faulhaber


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

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: incomplete batch-updates
Следующее
От: Jan de Visser
Дата:
Сообщение: Re: Implicit autocommit?