pgsql: Fix some problems with VACUUM (INDEX_CLEANUP FALSE).

Поиск
Список
Период
Сортировка
От Robert Haas
Тема pgsql: Fix some problems with VACUUM (INDEX_CLEANUP FALSE).
Дата
Msg-id E1hMCYd-00045b-4V@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix some problems with VACUUM (INDEX_CLEANUP FALSE).

The new nleft_dead_tuples and nleft_dead_itemids fields are confusing
and do not seem like the correct way forward.  One of them is tested
via an assertion that can fail, as it has already done on buildfarm
member topminnow.  Remove the assertion and the fields.

Change the logic for the case where a tuple is not initially pruned
by heap_page_prune but later diagnosed HEAPTUPLE_DEAD by
HeapTupleSatisfiesVacuum.  Previously, tupgone = true was set in
that case, which leads to treating the tuple as one that will be
removed.  In a normal vacuum, that's OK, because we'll remove
index entries for it and then the second heap pass will remove the
tuple itself, but when index cleanup is disabled, those things
don't happen, so we must instead treat it as a recently-dead
tuple that we have voluntarily chosen to keep.

Report and analysis by Tom Lane.  This patch loosely based on one
from Masahiko Sawada, but I changed most of it.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/dd69597988859c51131e0cbff3e30432db4259e1

Modified Files
--------------
src/backend/access/heap/vacuumlazy.c | 45 ++++++++----------------------------
1 file changed, 9 insertions(+), 36 deletions(-)


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: pgsql: doc: clarify behavior of pg_upgrade's clone mode
Следующее
От: Peter Geoghegan
Дата:
Сообщение: pgsql: Fix nbtsort.c's page space accounting.