Re: HOT chain validation in verify_heapam()

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Himanshu Upadhyaya <upadhyaya(dot)himanshu(at)gmail(dot)com>
Cc: Aleksander Alekseev <aleksander(at)timescale(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: HOT chain validation in verify_heapam()
Date: 2023-01-24 19:18:02
Message-ID: CA+TgmoY_FGLuCQA7PK5fqqPL7xReRStbQvGMw_BWJbHYpWEtTw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jan 22, 2023 at 10:19 AM Himanshu Upadhyaya
<upadhyaya(dot)himanshu(at)gmail(dot)com> wrote:
> I was trying to use lp_valid as I need to identify the root of the HOT chain and we are doing validation on the root of the HOT chain when we loop over the predecessor array.
> Was resetting lp_valid in the last patch because we don't add data to predecessor[] and while looping over the predecessor array we need to isolate (and identify) all cases of missing data in the predecessor array to exactly identify the root of HOT chain.
> One solution is to always add data to predecessor array while looping over successor array and then while looping over predecessor array we can continue for other validation "if (lp_valid [predecessor[currentoffnum]] && lp_valid[currentoffnum]" is true but in this case also our third loop will also look at lp_valid[].

I don't mind if the third loop looks at lp_valid if it has a reason to
do that, but I don't think we should be resetting values from true to
false. Once we know a line pointer to be valid, it doesn't stop being
valid later because we found out some other thing about something
else.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2023-01-24 19:18:44 Re: Non-superuser subscription owners
Previous Message Andres Freund 2023-01-24 19:07:21 Re: plpython vs _POSIX_C_SOURCE