Re: Patch for pgstatindex to fix a bug reporting a value of strange leaf_fragmentation

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tatsuhito Kasahara <kasahara(dot)tatsuhito(at)oss(dot)ntt(dot)co(dot)jp>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Patch for pgstatindex to fix a bug reporting a value of strange leaf_fragmentation
Date: 2007-03-09 03:17:38
Message-ID: 20070309031738.GA19555@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Tatsuhito Kasahara wrote:
> Hello.
>
> I found a bug in contrib/pgstatindex.c to reports a strange value of
> leaf_fragmentation with some cases.
> #Look the following test example.
>
> In GetBTPageStatistics(), stat->fragments is not initialized properly
> so that invalid leaf_fragments values are inserted in results.

Right. Checking that code, it seems btpo.xact is also being incorrectly
handled, is it not? Incidentally, the return value seems a bit useless.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Attachment Content-Type Size
pgstatindex.patch text/x-diff 2.7 KB

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2007-03-09 03:33:22 Re: Patch for pgstatindex to fix a bug reporting a value of strange leaf_fragmentation
Previous Message Mark Stosberg 2007-03-09 02:30:22 suggestion for improving TMPDIR and "--format" docs for pg_dump