Skip site navigation (1) Skip section navigation (2)

Re: GiST buffering build, bug in levelStep calculation

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: GiST buffering build, bug in levelStep calculation
Date: 2012-05-29 20:46:11
Message-ID: CAPpHfduK=enE+M2jRob5hvoLUtow=8DQY0dtNmRVrhc-PJEtXQ@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Wed, May 30, 2012 at 12:25 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Alexander Korotkov <aekorotkov(at)gmail(dot)com> writes:
> > On Tue, May 29, 2012 at 11:42 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> While I'm looking at this, is the first test involving
> >> effective_cache_size bulletproof either?  In particular, is
> >> avgIndexTuplesPerPage clamped to be strictly greater than 1?
>
> > It's based on collected statistics on already inserted tuple sizes. Since
> > tuple sizes are measured after possible toasting, I don't see the way
> > for avgIndexTuplesPerPage to be less than 1.
>
> Yeah, but if it could be *equal* to one, you've got a zero-divide there.
>

avgIndexTuplesPerPage is calculated as:

avgIndexTuplesPerPage = pageFreeSpace / itupAvgSize;

I think size of each index tuple must be at least few times lower
than pageFreeSpace to let us create any index.

------
With best regards,
Alexander Korotkov.

In response to

Responses

pgsql-hackers by date

Next:From: Mark DilgerDate: 2012-05-29 21:06:01
Subject: Performance patch for Win32
Previous:From: Magnus HaganderDate: 2012-05-29 20:31:20
Subject: Re: pg_basebackup --xlog compatibility break

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group