Re: Exception: "VACUUM cannot run inside a BEGIN/END block"

Rene Pijlman <[email protected]> Tue, 02 Dec 2003 12:10:45 +0100
Newsgroups gmane.comp.python.db.pypgsql.user
Organization the arrangement of parts so as to form an effective whole
Message-ID <[email protected]>
Billy G. Allie:
>Of course, using the libpq.conn.query method as suggested by Adam avoids 
>the need to create a cursor object, but you still need to be sure that 
>there are no open cursors for the connection when you use (opening a 
>connection with autocommit == 0 will open a transaction at cursor 
>creations time).

I see. I'm doing vacuum halfway through my algorithm (after
batch inserts/updates, before selects) and I'm beginning to
think its best to do the vacuum on a separate connection with
autocommit enabled.

-- 
Regards / Groeten,  http://www.leren.nl
René Pijlman        http://www.applinet.nl
  


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/