Re: Wrong comment in tuptable.h - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Wrong comment in tuptable.h
Date
Msg-id 20201227034314.vhci7a2u5talg6zq@alap3.anarazel.de
Whole thread Raw
In response to Wrong comment in tuptable.h  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
Hi,

On 2020-12-26 18:00:49 -0800, Jeff Davis wrote:
>   /*
>    * Return a copy of heap tuple representing the contents of the slot.
> The
>    * copy needs to be palloc'd in the current memory context. The slot
>    * itself is expected to remain unaffected. It is *not* expected to
> have
>    * meaningful "system columns" in the copy. The copy is not be
> "owned" by
>    * the slot i.e. the caller has to take responsibility to free memory
>    * consumed by the slot.
>    */
>   HeapTuple (*copy_heap_tuple) (TupleTableSlot *slot);
> 
> But acquire_sample_rows() calls ExecCopySlotHeapTuple(), and then
> subsequently sorts the rows by TID. Is acquire_sample_rows() doing
> something it shouldn't, or is the comment mistaken?

I think the comment is too vague and thinking of system columns as
xmin/xmax/cmin/cmax.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Wrong comment in tuptable.h
Next
From: Pavel Stehule
Date:
Subject: possible replacement for llvm JIT