Skip site navigation (1) Skip section navigation (2)

Fix for VACUUM in psql autocommit off

From: "Michael Paesold" <mpaesold(at)gmx(dot)at>
To: <pgsql-patches(at)postgresql(dot)org>
Subject: Fix for VACUUM in psql autocommit off
Date: 2004-09-19 19:13:42
Message-ID: 00a201c49e7c$c7ee6800$d604460a@zaphod (view raw or flat)
Thread:
Lists: 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: psql-autocommit-vacuum.diff
Description: application/octet-stream (389 bytes)

Responses

pgsql-patches by date

Next:From: Stephan SzaboDate: 2004-09-19 19:22:57
Subject: Re: How to add locale support for each column?
Previous:From: Greg StarkDate: 2004-09-19 19:02:28
Subject: Re: How to add locale support for each column?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group