Re: Question about running "Vacuum" through JDBC

From: Brad Nicholson <bnichols(at)ca(dot)afilias(dot)info>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Question about running "Vacuum" through JDBC
Date: 2005-05-06 15:52:05
Message-ID: 427B92A5.2010004@ca.afilias.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ying Lu wrote:

> Greetings,
>
> I tried to "Vacuum table" through JDBC. I got the following errors:
>
> ERROR: VACUUM cannot run inside a transaction block
>
> Does it mean I should only run vacuum through the command line such as
> "psql> vacuum TableName "?

Nope, it means exactly what the error says. You are trying to run vacum
inside a transaction, which can't be done. JDBC is likely opening a
transaction for you automatically. Stop it from doing this, and you
should be able to vacuum.

--
Brad Nicholson 416-673-4106
Database Administrator, Afilias Canada Corp.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Glaesemann 2005-05-06 15:54:36 Duplicate key error when updating unique columns
Previous Message Chris Browne 2005-05-06 15:49:33 Re: Adventures in Quest for GUI RAD