Re: The vacuum-ignore-vacuum patch

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: The vacuum-ignore-vacuum patch
Дата
Msg-id 19986.1154094458@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: The vacuum-ignore-vacuum patch  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: The vacuum-ignore-vacuum patch  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> Good question.  Imagine you have a serializable transaction like
> pg_dump, and then you have lots of newer transactions.  If pg_dump is
> xid=12, and all the new transactions start at xid=30, any row created
> and expired between 12 and 30 can be removed because they are not
> visible.

This reasoning is bogus.

It would probably be safe for pg_dump because it's a read-only
operation, but it fails badly if the serializable transaction is trying
to do updates.  An update needs to chase the chain of newer versions of
the row forward from the version that's visible to the xact's
serializable snapshot, to see if anyone has committed a newer version.
Your proposal would remove elements of that chain, thereby possibly
allowing the serializable xact to conclude it may update the tuple
when it should have given an error.
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: The vacuum-ignore-vacuum patch
Следующее
От: "Pavel Stehule"
Дата:
Сообщение: plperl and refcursor?