Re: HOT chain validation in verify_heapam() - Mailing list pgsql-hackers

From Aleksander Alekseev
Subject Re: HOT chain validation in verify_heapam()
Date
Msg-id CAJ7c6TP5CJOkNfM5=Qt4+YmiryL0_UCYtw0LRXr6HcUJ956KTg@mail.gmail.com
Whole thread Raw
In response to Re: HOT chain validation in verify_heapam()  (Mark Dilger <mark.dilger@enterprisedb.com>)
Responses Re: HOT chain validation in verify_heapam()
List 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 by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: Add pg_walinspect function with block info columns
Next
From: Laurenz Albe
Date:
Subject: Re: Allow tailoring of ICU locales with custom rules