diff options
author | Robert Haas <rhaas@postgresql.org> | 2023-03-27 13:37:16 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2023-03-27 13:37:16 -0400 |
commit | c87aff065c33e1a3c9bf0350f9160e84bfce1c36 (patch) | |
tree | bfdc2ffedc6b201acc1229295907cfd70d3675e4 /src/backend/commands/async.c | |
parent | 80d5e3a615518e9eee8ba4afa5cf05ebe486dbf6 (diff) | |
download | postgresql-c87aff065c33e1a3c9bf0350f9160e84bfce1c36.tar.gz postgresql-c87aff065c33e1a3c9bf0350f9160e84bfce1c36.zip |
amcheck: Generalize one of the recently-added update chain checks.
Commit bbc1376b39627c6bddd8a0dc0a7dda24c91a97a0 checked that if
a redirected line pointer pointed to a tuple, the tuple should be
marked both HEAP_ONLY_TUPLE and HEAP_UPDATED. But Andres Freund
pointed out that *any* tuple that is marked HEAP_ONLY_TUPLE should
be marked HEAP_UPDATED, not just one that is the target of a
redirected line pointer. Do that instead.
To see why this is better, consider a redirect line pointer A
which points to a heap-only tuple B which points (via CTID)
to another heap-only tuple C. With the old code, we'd complain
if B was not marked HEAP_UPDATED, but with this change, we'll
complain if either B or C is not marked HEAP_UPDATED.
(Note that, with or without this commit, if either B or C were
not marked HEAP_ONLY_TUPLE, we would also complain about that.)
Discussion: http://postgr.es/m/CA%2BTgmobLypZx%3DcOH%2ByY1GZmCruaoucHm77A6y_-Bo%3Dh-_3H28g%40mail.gmail.com
Diffstat (limited to 'src/backend/commands/async.c')
0 files changed, 0 insertions, 0 deletions