Re: Pluggable Storage - Andres's take - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Pluggable Storage - Andres's take
Date
Msg-id CA+TgmoZ6aAPCYS9VCFJiTHsxbTqxqUp0XVvj0NnkjemrnTDmYA@mail.gmail.com
Whole thread Raw
In response to Re: Pluggable Storage - Andres's take  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Thu, Apr 11, 2019 at 12:49 PM Andres Freund <andres@anarazel.de> wrote:
> > @@ -179,6 +184,12 @@ typedef struct TableAmRoutine
> >        *
> >        * if temp_snap is true, the snapshot will need to be deallocated at
> >        * scan_end.
> > +      *
> > +      * HEIKKI: table_scan_update_snapshot() changes the snapshot. That's
> > +      * a bit surprising for the AM, no? Can it be called when a scan is
> > +      * already in progress?
>
> Yea, it can be called when the scan is in-progress. I think we probably
> should just fix calling code to not need that - it's imo weird that
> nodeBitmapHeapscan.c doesn't just delay starting the scan till it has
> the snapshot. This isn't new code, but it's now going to be exposed to
> more AMs, so I think there's a good argument to fix it now.
>
> Robert: You committed that addition, in
>
> commit f35742ccb7aa53ee3ed8416bbb378b0c3eeb6bb9
> Author: Robert Haas <rhaas@postgresql.org>
> Date:   2017-03-08 12:05:43 -0500
>
>     Support parallel bitmap heap scans.
>
> do you remember why that's done?

I don't think there was any brilliant idea behind it.  Delaying the
scan start until it has the snapshot seems like a good idea.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Reducing the runtime of the core regression tests
Next
From: Tom Lane
Date:
Subject: Re: cache lookup failed for collation 0