Re: pgsql: Fix handling of all-zero pages in SP-GiST vacuum.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Fix handling of all-zero pages in SP-GiST vacuum.
Дата
Msg-id 27183.1438011411@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pgsql: Fix handling of all-zero pages in SP-GiST vacuum.  (Heikki Linnakangas <heikki.linnakangas@iki.fi>)
Ответы Re: pgsql: Fix handling of all-zero pages in SP-GiST vacuum.  (Heikki Linnakangas <hlinnaka@iki.fi>)
Список pgsql-committers
Heikki Linnakangas <heikki.linnakangas@iki.fi> writes:
> Fix handling of all-zero pages in SP-GiST vacuum.

I'm a little bit uncomfortable with the way that this patch presumes that
PageIsEmpty (a) is safe on an all-zeroes page and (b) will return true for
such a page.  Yes, it does work at the moment; but I don't think we are
making such an assumption anyplace else, and in view of your other two
concurrent patches, it doesn't seem very future-proof here either.
I recommend that the code look more like

    if (!SpGistBlockIsRoot(blkno))
    {
        if (PageIsNew(page) || PageIsEmpty(page))


            regards, tom lane


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Fix memory leak in xlogreader facility.
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Don't assume that PageIsEmpty() returns true on an all-zeros pag