Deduplicate choice of horizon for a relation procarray.c.
authorAndres Freund
Sun, 25 Jul 2021 03:14:03 +0000 (20:14 -0700)
committerAndres Freund
Sun, 25 Jul 2021 03:30:26 +0000 (20:30 -0700)
commit3d0a4636aa4c976e971c05c77e162fc70c61f40b
treec72e9b51487bc803478668bbd3fd1b58ebdf8d05
parent712ba6b8b73870fa9e3336df8d88f4bc5f824112
Deduplicate choice of horizon for a relation procarray.c.

5a1e1d83022 was a minimal bug fix for dc7420c2c92. To avoid future bugs of
that kind, deduplicate the choice of a relation's horizon into a new helper,
GlobalVisHorizonKindForRel().

As the code in question was only introduced in dc7420c2c92 it seems worth
backpatching this change as well, otherwise 14 will look different from all
other branches.

A different approach to this was suggested by Matthias van de Meent.

Author: Andres Freund
Discussion: https://postgr.es/m/20210621122919[email protected]
Backpatch: 14, like 5a1e1d83022
src/backend/storage/ipc/procarray.c