Fix for VACUUM in psql autocommit off - Mailing list pgsql-patches

From Michael Paesold
Subject Fix for VACUUM in psql autocommit off
Date
Msg-id 00a201c49e7c$c7ee6800$d604460a@zaphod
Whole thread Raw
Responses Re: Fix for VACUUM in psql autocommit off
List pgsql-patches
In current cvs (as in version 7.4.5), VACUUM does not work at all in
autocommit=off mode. That is, because psql does not know that VACUUM cannot
be performed inside an transaction.

Even if you do
ROLLBACK; VACUUM;
it will internally issue a ROLLBACK; BEGIN; VACUUM;

I consider this a bug and suggest the attached fix. is_transact_command() in
src/bin/psql/common.c is used to determine if a command is a transaction
modifying command. The diff just adds "vacuum" to those commands, so that
psql will not issue a BEGIN before a VACUUM.

Best Regards,
Michael Paesold

Attachment

pgsql-patches by date:

Previous
From: LELARGE Guillaume
Date:
Subject: Re: French translation updates for 7.4 and 7.5
Next
From: Tom Lane
Date:
Subject: Re: Fix for VACUUM in psql autocommit off