]> granicus.if.org Git - postgresql/commit
Perform a lot more sanity checks when freezing tuples.
authorAndres Freund <andres@anarazel.de>
Tue, 14 Nov 2017 02:45:47 +0000 (18:45 -0800)
committerAndres Freund <andres@anarazel.de>
Fri, 15 Dec 2017 02:20:48 +0000 (18:20 -0800)
commit4800f16a7ad08fe4145cdbbfedb9f63fdc282e28
tree0d6c7989197b40d28c12fe20837e7d5c8950ac3c
parent387abe8707745f1f136c8942ac7d72cf4601d69e
Perform a lot more sanity checks when freezing tuples.

The previous commit has shown that the sanity checks around freezing
aren't strong enough. Strengthening them seems especially important
because the existance of the bug has caused corruption that we don't
want to make even worse during future vacuum cycles.

The errors are emitted with ereport rather than elog, despite being
"should never happen" messages, so a proper error code is emitted. To
avoid superflous translations, mark messages as internal.

Author: Andres Freund and Alvaro Herrera
Reviewed-By: Alvaro Herrera, Michael Paquier
Discussion: https://postgr.es/m/20171102112019.33wb7g5wp4zpjelu@alap3.anarazel.de
Backpatch: 9.3-
src/backend/access/heap/heapam.c
src/backend/access/heap/rewriteheap.c
src/backend/commands/vacuumlazy.c
src/include/access/heapam.h
src/include/access/heapam_xlog.h