Re: HOT chain validation in verify_heapam()

Aleksander Alekseev <aleksander@timescale.com>

From: Aleksander Alekseev <aleksander@timescale.com>
To: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Cc: Robert Haas <robertmhaas@gmail.com>, Himanshu Upadhyaya <upadhyaya.himanshu@gmail.com>, Mark Dilger <mark.dilger@enterprisedb.com>, Andres Freund <andres@anarazel.de>
Date: 2023-03-08T13:59:39Z
Lists: pgsql-hackers
Hi,

> > ```
> > +$node->append_conf('postgresql.conf','max_prepared_transactions=100');
> > ```
> >
> > From what I can tell this line is not needed.
>
> That surprises me, because the new test cases involve preparing a
> transaction, and by default max_prepared_transactions=0. So it seems
> to me (without testing) that this ought to be required. Did you test
> that it works without this setting?

Sorry, I was wrong the first time. The test fails without this line:

```
112/238 postgresql:pg_amcheck / pg_amcheck/004_verify_heapam ERROR
4.94s exit status 29
```

-- 
Best regards,
Aleksander Alekseev



Commits

  1. amcheck: Generalize one of the recently-added update chain checks.

  2. amcheck: Tighten up validation of redirect line pointers.

  3. amcheck: Fix verify_heapam for tuples where xmin or xmax is 0.

  4. amcheck: Fix a few bugs in new update chain validation.

  5. Fix new test case to work on (some?) big-endian architectures.

  6. Don't test HEAP_XMAX_INVALID when freezing xmax.