pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomonari Katsumata <katsumata.tomonari@po.ntts.co.jp>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6643: [PostgreSQL9.2beta1] COPY after changing fillfactor gets a PANIC.
Date: Wed, 16 May 2012 20:35:44 +0900
Message-ID: <4FB39110.6070504@po.ntts.co.jp> (raw)
In-Reply-To: <4FB38C29.8070009@enterprisedb.com>
References: <E1SUbdo-0004kB-OT@wrigleys.postgresql.org>
	<4FB385C9.8050001@enterprisedb.com>
	<4FB38C29.8070009@enterprisedb.com>

Hi, Heikki

I'm sorry, forgotten attach files.

I've tryed to send mail with files,
but I could not...
(I think this is my mail server problem.)


Thank you very much for fixing it!

(2012/05/16 20:14), Heikki Linnakangas wrote:
> On 16.05.2012 13:47, Heikki Linnakangas wrote:
>> This sounds like a bug in the new page-at-a-time behavior in COPY. Can
>> you send me a self-contained test, including the test data?
>
> Never mind. After staring at the code for a while, I spotted the bug, 
> and was able to reproduce with a simpler case. It's quite easy to 
> reproduce when you set fillfactor even lower, like 10.
>
> The problem is with this line in heap_multi_insert function:
>
>     if (PageGetHeapFreeSpace(page) - saveFreeSpace < 
> MAXALIGN(heaptup->t_len))
>
> That doesn't work as intended, because the return value of 
> PageGetHeapFreeSpace and saveFreeSpace are unsigned. When 
> saveFreeSpace is larger than the amount of free space on the page, the 
> left hand side of that comparison is supposed to go negative, but it 
> wraps around to a highly positive number because it's unsigned.
>
> Fixed, thanks for the report!




view thread (4+ messages)

Message-ID: <4FB39110.6070504@po.ntts.co.jp>
Permalink:  ../4FB39110.6070504@po.ntts.co.jp/
Also on:    postgresql.org/message-id/4FB39110.6070504@po.ntts.co.jp

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: katsumata.tomonari@po.ntts.co.jp, heikki.linnakangas@enterprisedb.com
  Subject: Re: BUG #6643: [PostgreSQL9.2beta1] COPY after changing fillfactor gets a PANIC.
  In-Reply-To: <4FB39110.6070504@po.ntts.co.jp>
  References: <E1SUbdo-0004kB-OT@wrigleys.postgresql.org> <4FB385C9.8050001@enterprisedb.com> <4FB38C29.8070009@enterprisedb.com> <4FB39110.6070504@po.ntts.co.jp>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox