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

Re: Problem with PITR Past Particular WAL File

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Craig McElroy <craig(dot)mcelroy(at)contegix(dot)com>, PostgreSQL Admin List <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Problem with PITR Past Particular WAL File
Date: 2007-10-25 18:05:45
Message-ID: 4720DAF9.6080002@sigaev.ru (view raw or flat)
Thread:
Lists: pgsql-admin
>> #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(at)sigaev(dot)ru
                                                    WWW: http://www.sigaev.ru/

In response to

Responses

pgsql-admin by date

Next:From: smiley2211Date: 2007-10-25 18:24:08
Subject: Database Restore - time of last occurrence
Previous:From: Tom LaneDate: 2007-10-25 15:59:34
Subject: Re: Problem with PITR Past Particular WAL File

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