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

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: jcnaylor(at)gmail(dot)com, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: Avoid creation of the free space map for small tables
Date: 2018-11-03 04:41:28
Message-ID: CAA4eK1JiNZg+8kDATDLB4ox8z6p8v011A-yfSKSt-8DqmtUySA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 2, 2018 at 7:29 PM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> On Fri, Nov 2, 2018 at 7:23 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> > > That doesn't seem like an unreasonable argument. I'm not sure whether
> > > the right threshold is 4 or something a little bigger, but I bet it's
> > > not very large. It seems important to me that before anybody thinks
> > > about committing this, we construct some kind of destruction case
> > > where repeated scans of the whole table are triggered as frequently as
> > > possible, and then run that test with varying thresholds.
> >
> > Why do you think repeated scans will be a destruction case when there
> > is no FSM for a small table?
>
> That's not what I'm saying. If we don't have the FSM, we have to
> check every page of the table. If there's a workload where that
> happens a lot on a table that is just under the size threshold for
> creating the FSM, then it's likely to be a worst case for this patch.
>

That makes sense and this is the first thing I was also worried about
after looking at the initial patch and suggested a test [1] which can
hit the worst case.

[1] - https://www.postgresql.org/message-id/CAA4eK1%2BhP-jGYWi25-1QMedxeM_0H01s%3D%3D4-t74oEgL2EDVicw%40mail.gmail.com

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2018-11-03 04:48:02 Re: WIP: Avoid creation of the free space map for small tables
Previous Message Amit Kapila 2018-11-03 04:00:47 Re: zheap: a new storage format for PostgreSQL