Re: TOAST-table vacuuming (was Re: Idea for reducing pl anning time) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: TOAST-table vacuuming (was Re: Idea for reducing pl anning time)
Date
Msg-id 2512.977447458@sss.pgh.pa.us
Whole thread Raw
In response to Re: TOAST-table vacuuming (was Re: Idea for reducing pl anning time)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I said:
> Other than that, it seems like it'd work, and it'd allow us to do a
> normal transaction commit internally in VACUUM, which is a lot cleaner
> than what VACUUM does now.

I punted on actually changing repair_frag's RecordTransactionCommit()
call into CommitTransactionCommand()/StartTransactionCommand().  That
would now work as far as holding an exclusive lock on the table goes,
but there's more code that would have to be added to close/reopen the
relation and its indexes, ensure that all of VACUUM's internal data
structures survive into the new transaction, etc etc.  I didn't have time
for that right now, so I left it as-is.  Perhaps someone will feel like
cleaning it up for 7.2 or later.

However, the important thing is fixed: a TOAST table is now vacuumed
in a separate transaction from its master, while still holding a lock
that prevents anyone else from touching the master.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Oliver Elphick"
Date:
Subject: Re: (7.1) BIT datatype
Next
From: "Christopher Kings-Lynne"
Date:
Subject: RE: Inline Comments for pg_dump