Re: Buglist

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Buglist
Дата
Msg-id 17323.1061409726@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Buglist  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Ответы Re: Buglist  (Jan Wieck <JanWieck@Yahoo.com>)
Список pgsql-general
Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> True, but the message being responded to was specifically "if the backend
> were to do the checking for external references upon updating/deleting a
> row".

It's clearly impossible for a backend to remove a row immediately upon
updating/deleting it, since it cannot know whether it will succeed in
committing its transaction.  The implementable variant of this would
correspond to extending the check-whether-committed-deleted code to see
whether a previously deleted tuple is now removable --- that is, moving
VACUUM's processing of the tuple into the main line.

> In any case, I thought it only does the committed deleted stuff
> when it comes upon a row in a scan, which means that it's still not
> automatic clean up in general since any particular deleted row may not get
> looked at for some amount of time after all possible viewers are gone.

Recall also that "committed deleted" does not mean "safe to remove".
There may still be live transactions that could see the tuple.  The
"committed deleted" bit just exists to allow subsequent visitors to the
row to skip one of the more expensive steps in deciding whether they can
see it or not.

To determine that a row is removable requires additional tests above and
beyond what backends normally do.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Grouping by date range
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: Buglist