Re: HOT chain validation in verify_heapam()

Поиск
Список
Период
Сортировка
От Aleksander Alekseev
Тема Re: HOT chain validation in verify_heapam()
Дата
Msg-id CAJ7c6TP5CJOkNfM5=Qt4+YmiryL0_UCYtw0LRXr6HcUJ956KTg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: HOT chain validation in verify_heapam()  (Mark Dilger <mark.dilger@enterprisedb.com>)
Ответы Re: HOT chain validation in verify_heapam()  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Hi,

> Note that I have not tried any of this yet.

I did, both with Meson and Autotools. All in all the patch looks very
good, but I have a few little nitpicks.

```
+                /* HOT chains should not intersect. */
+                if (predecessor[nextoffnum] != InvalidOffsetNumber)
+                {
+                    report_corruption(&ctx,
+                                      psprintf("redirect line pointer
points to offset %u, but offset %u also points there",
+                                               (unsigned) nextoffnum,
(unsigned) predecessor[nextoffnum]));
+                    continue;
+                }
```

This type of corruption doesn't seem to be test-covered.

```
+            /*
+             * If the next line pointer is a redirect, or if it's a tuple
+             * but the XMAX of this tuple doesn't match the XMIN of the next
+             * tuple, then the two aren't part of the same update chain and
+             * there is nothing more to do.
+             */
+            if (ItemIdIsRedirected(next_lp))
+                continue;
```

lcov shows that the `continue` path is never executed. This is
probably not a big deal however.

```
+$node->append_conf('postgresql.conf','max_prepared_transactions=100');
```

From what I can tell this line is not needed.

-- 
Best regards,
Aleksander Alekseev



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

Предыдущее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Add pg_walinspect function with block info columns
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: Allow tailoring of ICU locales with custom rules