Re: How to make lazy VACUUM of one table run in several transactions ? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: How to make lazy VACUUM of one table run in several transactions ?
Date
Msg-id 18298.1115044719@sss.pgh.pa.us
Whole thread Raw
In response to Re: How to make lazy VACUUM of one table run in several  (Hannu Krosing <hannu@tm.ee>)
Responses Re: How to make lazy VACUUM of one table run in several  (Hannu Krosing <hannu@tm.ee>)
List pgsql-hackers
Hannu Krosing <hannu@tm.ee> writes:
> A more general solution to the problem "VACUUM does not clean dead
> tuples fast enough due to an old transaction" problem is keeping the
> OldestXmin for each table separately as a list of table OIDs in each
> PGPROC. 

> This would be automatically extandable to long COPY, or in fact any
> single SQL statement running in its implicit transaction by examining
> the query plan and reserving all tables touched by the query and its
> dependencies. 

This is completely unworkable, since it amounts to assuming you know at
the start of a serializable transaction which tables it will touch.  In
point of fact you can't even know that for the current query let alone
future ones --- consider user-defined functions.

(Not to mention that we can't expect to fit that much info into a fixed
amount of shared memory.)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Feature freeze date for 8.1
Next
From: Stephen Frost
Date:
Subject: Re: Using LDAP for authorization