Re: Clarification of action on Delete - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Clarification of action on Delete
Date
Msg-id 11108.1094767823@sss.pgh.pa.us
Whole thread Raw
In response to Re: Clarification of action on Delete  ("Simon Riggs" <simon@2ndquadrant.com>)
List pgsql-hackers
"Simon Riggs" <simon@2ndquadrant.com> writes:
>> Tom Lane wrote
>> It would be nice to push the TOAST deletions off to become the
>> responsibility of VACUUM, but I'm not entirely sure how to do that
>> without giving up the UPDATE optimization of shared values.

> That could be optimised, but there are advantages to removing TOASTed values
> immediately since they are potentially big space hogs, so I'm actually glad
> to hear that it works that way.

Well, they certainly aren't going to be *removed* immediately; we
couldn't roll back the deletion if we did.  The physical removal
will happen during VACUUM, same as for ordinary table rows.  So there's
not really any functional reason why we couldn't have VACUUM do the
marking for removal too, except that it does not know when looking at
the deleted table row whether the toast entries are shared with other
versions of the row.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Greg Sabino Mullane"
Date:
Subject: Re: psql questions: SQL, progname, copyright dates
Next
From: Tatsuo Ishii
Date:
Subject: Re: row wise comparison broken