Minor cleanup/code review for "indirect toast" stuff.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: ccf655c446d9b2de98455cf29f27795e0e067779
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2015-02-09T17:30:55Z
Releases: 9.4.2
Minor cleanup/code review for "indirect toast" stuff.

Fix some issues I noticed while fooling with an extension to allow an
additional kind of toast pointer.  Much of this is just comment
improvement, but there are a couple of actual bugs, which might or might
not be reachable today depending on what can happen during logical
decoding.  An example is that toast_flatten_tuple() failed to cover the
possibility of an indirection pointer in its input.  Back-patch to 9.4
just in case that is reachable now.

In HEAD, also correct some really minor issues with recent compression
reorganization, such as dangerously underparenthesized macros.

Files

PathChange+/−
src/backend/access/heap/tuptoaster.c modified +37 −16
src/include/access/tuptoaster.h modified +3 −3
src/include/postgres.h modified +19 −18