Re: WIP: Avoid creation of the free space map for small tables

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: jcnaylor(at)gmail(dot)com
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: Avoid creation of the free space map for small tables
Date: 2018-11-20 12:48:19
Message-ID: CAA4eK1+DvBkGBiJ5HEP9Y_zYqJmrNWMmD9qLNvxvFy_-OzsL5w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 20, 2018 at 1:42 PM John Naylor <jcnaylor(at)gmail(dot)com> wrote:
>
> I wrote:
>
> > On 11/19/18, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> > [ abortive states ]
> >> I think it might come from any other place between when you set it and
> >> before it got cleared (like any intermediate buffer and pin related
> >> API's).
> >
> > Okay, I will look into that.
>
> LockBuffer(), visibilitymap_pin(), and GetVisibilityMapPins() don't
> call errors at this level. I don't immediately see any additional good
> places from which to clear the local map.
>

LockBuffer()->LWLockAcquire() can error out. Similarly,
ReadBuffer()->ReadBufferExtended() and calls below it can error ou.
To handle them, you need to add a call to clear local map in
Abortransaction code path.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2018-11-20 12:53:53 Re: Shared Memory: How to use SYSV rather than MMAP ?
Previous Message Jean-Christophe Arnu 2018-11-20 12:44:14 Re: wal_dump output on CREATE DATABASE