Re: Pluggable Storage - Andres's take

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Asim R P <apraveen(at)pivotal(dot)io>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Ashwin Agrawal <aagrawal(at)pivotal(dot)io>, Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
Subject: Re: Pluggable Storage - Andres's take
Date: 2019-04-11 17:11:36
Message-ID: CA+TgmoZ6aAPCYS9VCFJiTHsxbTqxqUp0XVvj0NnkjemrnTDmYA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 11, 2019 at 12:49 PM Andres Freund <andres(at)anarazel(dot)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(at)postgresql(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-04-11 17:20:41 Re: cache lookup failed for collation 0
Previous Message Peter Geoghegan 2019-04-11 17:02:02 Re: Reducing the runtime of the core regression tests