Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 5998E9FC9D0 for ; Thu, 25 Oct 2007 16:28:32 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 18041-02 for ; Thu, 25 Oct 2007 16:28:14 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from qmail01.contegix.com (ns2.contegix.com [63.246.22.100]) by postgresql.org (Postfix) with ESMTP id B0F269F9693 for ; Thu, 25 Oct 2007 16:28:22 -0300 (ADT) Received: (qmail 27388 invoked by uid 89); 25 Oct 2007 19:28:21 -0000 Received: from unknown (HELO mail.contegix.com) (63.246.22.119) by a.mx.contegix.com with SMTP; 25 Oct 2007 19:28:21 -0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.contegix.com (Postfix) with ESMTP id 773FE50403F; Thu, 25 Oct 2007 14:28:21 -0500 (CDT) X-Virus-Scanned: amavisd-new at Received: from mail.contegix.com ([127.0.0.1]) by localhost (mail.contegix.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lohISWIBBhW7; Thu, 25 Oct 2007 14:28:20 -0500 (CDT) Received: from [10.10.161.100] (seraph.contegix.com [63.246.22.126]) by mail.contegix.com (Postfix) with ESMTP id 4FA3D504039; Thu, 25 Oct 2007 14:28:20 -0500 (CDT) In-Reply-To: <4720DAF9.6080002@sigaev.ru> References: <10123.1193250394@sss.pgh.pa.us> <1FAEADD9-FE4A-444E-9B45-D6192B0265E5@contegix.com> <16979.1193327974@sss.pgh.pa.us> <4720DAF9.6080002@sigaev.ru> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: multipart/alternative; boundary=Apple-Mail-37-284916614 Message-Id: <4E5ADC27-53C9-4A63-8BE2-7563E2EC89EB@contegix.com> Cc: Tom Lane , PostgreSQL Admin List From: Craig McElroy Subject: Re: Problem with PITR Past Particular WAL File Date: Thu, 25 Oct 2007 14:28:01 -0500 To: Teodor Sigaev X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/258 X-Sequence-Number: 27172 --Apple-Mail-37-284916614 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Teodor: Thanks for the followup. We will be upgrading this system to 8.2.5 in the next day or so and will test it on that anyways just to be sure it isn't related. Let me know if there is anything else we can provide to help track down the bug. We will be keeping this base backup and WAL files around so that we can use them for testing. Cheers, -craig --- Craig A. McElroy Contegix Beyond Managed Hosting(r) for Your Enterprise On Oct 25, 2007, at 1:05 PM, Teodor Sigaev wrote: >>> #0 0x080b8ee0 in entrySplitPage () >>> #1 0x080baccf in ginInsertValue () > Corrupted stack? gin_xlog_cleanup() doesn't call ginInsertValue() > directly. > >>> #2 0x080b81b7 in gin_xlog_cleanup () >>> #3 0x080af4ce in StartupXLOG () >>> #4 0x080c04ca in BootstrapMain () >>> #5 0x08186b2f in StartChildProcess () >>> #6 0x081889eb in PostmasterMain () >>> #7 0x0814ee9e in main () > >> Teodor, can you comment on whether this stack trace looks like it >> could >> be related to that fix? > No, I suppose. That changes was about deadlock prevention, > recognize splits and > fixes in deletion of page in a posting tree. entrySplitPage() is a > split of page of indexed values. > > Hmm. I suppose, I found a reason. Real backtrace should look like: > gin_xlog_cleanup() > ginContinueSplit() > prepareEntryScan(,,,NULL) // makes btree.ginstate = NULL > ginInsertValue() > entrySplitPage() // tries to access > // btree->ginstate->tupdesc in > // 497 line > > > That piece of code: > value = index_getattr(leftrightmost, FirstOffsetNumber, btree- > >ginstate->tupdesc, &isnull); > btree->entry = GinFormTuple(btree->ginstate, value, NULL, 0); > ItemPointerSet(&(btree->entry)->t_tid, BufferGetBlockNumber > (lbuf), InvalidOffsetNumber); > > It just makes new tuple with the same value and another > ItemPointer. Some later I'll make a patch which will not call > index_getattr() and GinFormTuple() - now I know how make a test suite. > > -- > Teodor Sigaev E-mail: > teodor@sigaev.ru > WWW: http:// > www.sigaev.ru/ > > ---------------------------(end of > broadcast)--------------------------- > TIP 6: explain analyze is your friend --Apple-Mail-37-284916614 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 Teodor:
=A0 Thanks for the = followup.=A0 We will be upgrading this system to 8.2.5 in the next day = or so and will test it on that anyways just to be sure it isn't = related.=A0 Let me know if there is anything else we can provide to help = track down the bug.=A0 We will be keeping this base backup and WAL files = around so that we can use them for testing.

Cheers,
-craig
Craig A. McElroy
Contegix
Beyond = Managed Hosting(r) for Your Enterprise

=

On Oct 25, 2007, at 1:05 PM, Teodor Sigaev = wrote:

#0=A0 = 0x080b8ee0 in entrySplitPage ()
#1=A0 0x080baccf in ginInsertValue = ()
Corrupted = stack? gin_xlog_cleanup() doesn't call ginInsertValue() = directly.

=
#2=A0 = 0x080b81b7 in gin_xlog_cleanup ()
#3=A0 0x080af4ce in StartupXLOG = ()
#4=A0 = 0x080c04ca in BootstrapMain ()
#5=A0 0x08186b2f in = StartChildProcess ()
#6=A0 0x081889eb in PostmasterMain = ()
#7=A0 = 0x0814ee9e in main ()

Teodor, can you comment on = whether this stack trace looks like it could
be related to that fix?
No, I suppose. That changes was about deadlock = prevention, recognize splits and
fixes in = deletion of page in a posting tree. entrySplitPage() is a split of page = of indexed values.
Hmm. I suppose, I found a = reason. Real backtrace should look like:
=A0gin_xlog_cleanup()
ginContinueSplit()
prepareEntryScan(,,,NULL) // = makes btree.ginstate =3D NULL
= ginInsertValue()
= entrySplitPage() // tries to access
// = btree->ginstate->tupdesc in
// 497 = line


That = piece of code:
=A0 =A0 value =3D = index_getattr(leftrightmost, FirstOffsetNumber, = btree->ginstate->tupdesc, &isnull);
=A0 =A0 = btree->entry =3D GinFormTuple(btree->ginstate, value, NULL, = 0);
=A0 =A0 = ItemPointerSet(&(btree->entry)->t_tid, = BufferGetBlockNumber(lbuf), InvalidOffsetNumber);

It just = makes new tuple with the same value and another ItemPointer. Some later = I'll make a patch which will not call index_getattr() and GinFormTuple() = - now I know how make a test suite.

--=A0
Teodor = Sigaev =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 E-mail: teodor@sigaev.ru
=A0=A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 WWW: http://www.sigaev.ru/

TIP 6: = explain analyze is your friend
=

= --Apple-Mail-37-284916614--