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

Re: How to make lazy VACUUM of one table run in several transactions ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hannu Krosing <hannu(at)tm(dot)ee>
Cc: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>,pgsql-hackers(at)postgresql(dot)org
Subject: Re: How to make lazy VACUUM of one table run in several transactions ?
Date: 2005-04-26 21:54:44
Message-ID: 13571.1114552484@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Hannu Krosing <hannu(at)tm(dot)ee> writes:
> Could I avoid having a transaction at all?

Not really; too much of the database access infrastructure is tied to
transaction stuff ... even facilities as basic as memory management.

> As VACUUM is not "transactional" in the sense that it does not change
> anything visible to users ever, can't be undone by rollback, etc... ,
> could it be possible to create enough "transaction-like" environment for
> it to really run outside of transactions. Perhaps just advancing
> oldestXmin at certain intervals ?

I wonder whether you could avoid advertising the VACUUM's XID in PGPROC.
Not sure that this can work, but it would be a lot simpler than stopping
and starting transactions ...

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2005-04-26 21:56:43
Subject: Re: DO INSTEAD and conditional rules
Previous:From: David WheelerDate: 2005-04-26 21:53:38
Subject: Re: DO INSTEAD and conditional rules

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