Re: Tid scan improvements

From: Edmund Horner <ejrh00(at)gmail(dot)com>
To: alvherre(at)2ndquadrant(dot)com
Cc: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Tid scan improvements
Date: 2018-11-07 22:31:05
Message-ID: CAMyN-kCq+fDLUSEN+TmUkpn5YGQCyKKR266tyEnJjOd_WT-SDQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 6 Nov 2018 at 16:52, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
> On 2018-Nov-06, David Rowley wrote:
> > 14. we pass 'false' to what?
> >
> > + * save the tuple and the buffer returned to us by the access methods in
> > + * our scan tuple slot and return the slot. Note: we pass 'false' because
> > + * tuples returned by heap_getnext() are pointers onto disk pages and were
> > + * not created with palloc() and so should not be pfree()'d. Note also
> > + * that ExecStoreHeapTuple will increment the refcount of the buffer; the
> > + * refcount will not be dropped until the tuple table slot is cleared.
> > */
>
> Seems a mistake stemming from 29c94e03c7d0 ...

Yep -- I copied that bit from nodeSeqscan.c. Some of the notes were
removed in that change, but nodeSeqscan.c and nodeIndexscan.c still
have them.

I made a little patch to remove them.

Attachment Content-Type Size
remove-obsolete-ExecStoreTuple-notes.patch application/octet-stream 1.4 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2018-11-07 22:48:52 Re: pread() and pwrite()
Previous Message David Rowley 2018-11-07 21:34:57 Re: Calculate total_table_pages after set_base_rel_sizes()