pgsql: Deduplicate choice of horizon for a relation procarray.c.

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Deduplicate choice of horizon for a relation procarray.c.
Date: 2021-07-25 03:34:22
Message-ID: E1m7UuE-0007Gm-9e@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

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.2qhu3pfugxxp3cji@alap3.anarazel.de
Backpatch: 14, like 5a1e1d83022

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3d0a4636aa4c976e971c05c77e162fc70c61f40b

Modified Files
--------------
src/backend/storage/ipc/procarray.c | 98 ++++++++++++++++++++++++-------------
1 file changed, 64 insertions(+), 34 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2021-07-25 18:03:02 pgsql: Get rid of artificial restriction on hash table sizes on Windows
Previous Message Andres Freund 2021-07-25 03:34:19 pgsql: Deduplicate choice of horizon for a relation procarray.c.

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2021-07-25 03:34:55 Re: pg14b1 stuck in lazy_scan_prune/heap_page_prune of pg_statistic
Previous Message Fujii Masao 2021-07-25 03:10:07 Re: log_checkpoint's "WAL file(s) added" is misleading to the point of uselessness