Re: Rename dead_tuples to dead_items in vacuumlazy.c

Поиск
Список
Период
Сортировка
От Masahiko Sawada
Тема Re: Rename dead_tuples to dead_items in vacuumlazy.c
Дата
Msg-id CAD21AoDXrAPfXpCmzDFR4mVCig6f2jnPnpMib3UuXGVuJfUTQQ@mail.gmail.com
обсуждение исходный текст
Ответ на Rename dead_tuples to dead_items in vacuumlazy.c  (Peter Geoghegan <pg@bowt.ie>)
Ответы Re: Rename dead_tuples to dead_items in vacuumlazy.c  (Robert Haas <robertmhaas@gmail.com>)
Re: Rename dead_tuples to dead_items in vacuumlazy.c  (Peter Geoghegan <pg@bowt.ie>)
Список pgsql-hackers
On Wed, Nov 24, 2021 at 2:46 PM Peter Geoghegan <pg@bowt.ie> wrote:
>
> Attached patch performs polishing within vacuumlazy.c, as follow-up
> work to the refactoring work in Postgres 14. This mainly consists of
> changing references of dead tuples to dead items, which reflects the
> fact that VACUUM no longer deals with TIDs that might point to
> remaining heap tuples with storage -- the TIDs in the array must now
> strictly point to LP_DEAD stub line pointers that remain in the heap,
> following pruning.

+1

> If there are no objections, I'll move on this soon. It's mostly just
> mechanical changes.

The patch renames dead tuples to dead items at some places and  to
dead TIDs at some places. For instance, it renames dead tuples to dead
TIDs here:

- * Return the maximum number of dead tuples we can record.
+ * Computes the number of dead TIDs that VACUUM will have to store in the
+ * worst case, where all line pointers are allocated, and all are LP_DEAD

whereas renames to dead items here:

-         * extra cost of bsearch(), especially if dead tuples on the heap are
+         * extra cost of bsearch(), especially if dead items on the heap are

I think it's more consistent if we change it to one side. I prefer "dead items".

---
There is one more place where we can rename "dead tuples":

    /*
     * Allocate the space for dead tuples.  Note that this handles parallel
     * VACUUM initialization as part of allocating shared memory space used
     * for dead_items.
     */

Regards,


--
Masahiko Sawada
EDB:  https://www.enterprisedb.com/



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

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: VS2022: Support Visual Studio 2022 on Windows
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: row filtering for logical replication