Re: Comment typo in tableam.h

From: Ashwin Agrawal <aagrawal(at)pivotal(dot)io>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Antonin Houska <ah(at)cybertec(dot)at>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Comment typo in tableam.h
Date: 2019-06-04 01:41:35
Message-ID: CALfoeisPsn1tQ67yZyGHSrO_XYw3Ttn9iZt6NrW_yNGYxaWRQA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 3, 2019 at 6:24 PM Andres Freund <andres(at)anarazel(dot)de> wrote:

> Hi,
>
> On 2019-06-03 18:21:56 -0700, Ashwin Agrawal wrote:
> > On Mon, Jun 3, 2019 at 5:26 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
> >
> > > Hi,
> > >
> > > Thanks for these!
> > >
> > > On 2019-06-03 17:24:15 -0700, Ashwin Agrawal wrote:
> > > > /*
> > > > * Estimate the size of shared memory needed for a parallel
> scan
> > > of this
> > > > - * relation. The snapshot does not need to be accounted for.
> > > > + * relation.
> > > > */
> > > > Size (*parallelscan_estimate) (Relation rel);
> > >
> > > That's not a typo?
> > >
> >
> > The snapshot is not passed as argument to that function hence seems weird
> > to refer to snapshot in the comment, as anyways callback function can't
> > account for it.
>
> It's part of the parallel scan struct, and it used to be accounted for
> by pre tableam function...
>

Reads like the comment written from past context then, and doesn't have
much value now. Its confusing than helping, to state not to account for
snapshot and not any other field.
table_parallelscan_estimate() has snapshot argument and it accounts for it,
but callback doesn't. I am not sure how a callback would explicitly use
that comment and avoid accounting for snapshot if its using generic
ParallelTableScanDescData. But if you feel is helpful, please feel free to
keep that text.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-06-04 01:46:30 Re: coverage additions
Previous Message Michael Paquier 2019-06-04 01:37:59 Re: Print baserestrictinfo for varchar fields