Re: Fix comments of heap_prune_chain()

From: Masahiro Ikeda <ikedamsh(at)oss(dot)nttdata(dot)com>
To: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix comments of heap_prune_chain()
Date: 2021-07-13 10:05:10
Message-ID: 1aa07e2a-b715-5649-6c62-4fff96304d18@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021/07/13 5:57, Matthias van de Meent wrote:
>
>
> On Mon, 12 Jul 2021 at 13:14, <ikedamsh(at)oss(dot)nttdata(dot)com
> <mailto:ikedamsh(at)oss(dot)nttdata(dot)com>> wrote:
>>
>> Hi,
>>
>> While I’m reading source codes related to vacuum, I found comments which
>> don’t seem to fit the reality. I think the commit[1] just forgot to fix them.
>> What do you think?
>
> Hmm, yes, those are indeed some leftovers.
>
> Some comments on the suggested changes:
>
>
> - * caused by HeapTupleSatisfiesVacuum.  We just add entries to the arrays in
> + * caused by heap_prune_satisfies_vacuum.  We just add entries to the arrays in
>
> I think that HeapTupleSatisfiesVacuumHorizon might be an alternative correct
> replacement here.
>
>
> -                elog(ERROR, "unexpected HeapTupleSatisfiesVacuum result");
> +                elog(ERROR, "unexpected heap_prune_satisfies_vacuum result");
>
> The type of the value is HTSV_Result; where HTSV stands for
> HeapTupleSatisfiesVacuum, so if we were to replace this, I'd go for
> "unexpected result from heap_prune_satisfies_vacuum" as a message instead.

Thanks for your comments. I agree your suggestions.

I also updated prstate->vistest to heap_prune_satisfies_vacuum of v1 patch
because heap_prune_satisfies_vacuum() tests with not only prstate->vistest but
also prstate->old_snap_xmin. I think it's more accurate representation.

Regards,
--
Masahiro Ikeda
NTT DATA CORPORATION

Attachment Content-Type Size
v2-0001-fix_heap_prune_chain.patch text/x-patch 1.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Maxim Orlov 2021-07-13 10:10:34 Re: Parallel scan with SubTransGetTopmostTransaction assert coredump
Previous Message Andy Fan 2021-07-13 09:55:21 Re: Keep notnullattrs in RelOptInfo (Was part of UniqueKey patch series)