From: | Teodor Sigaev <teodor(at)sigaev(dot)ru> |
---|---|
To: | Tom Lane <tgl(at)postgresql(dot)org> |
Cc: | pgsql-committers(at)postgresql(dot)org, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> |
Subject: | Re: pgsql: Improve gist XLOG code to follow the coding |
Date: | 2006-03-31 09:35:23 |
Message-ID: | 442CF7DB.3040800@sigaev.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
> -----------
> Improve gist XLOG code to follow the coding rules needed to prevent
> torn-page problems. This introduces some issues of its own, mainly
> that there are now some critical sections of unreasonably broad scope,
> but it's a step forward anyway. Further cleanup will require some
> code refactoring that I'd prefer to get Oleg and Teodor involved in.
Here I am. Oleg now is in expedition to solar eclipse (should return soon).
Some answers on your XXX
* gist.c:gistnewroot
GISTInitBuffer(buffer, 0); /* XXX not F_LEAF? */
F_LEAF will be never set in new root, because gistnewroot is called when
split of old root page is occured. Even it was a leaf (tree had only one
page), new root will be non-leaf page.
* gistxlog.c:gistContinueInsert
/*
* XXX fall out to avoid making LOG message at bottom of routine.
* I think the logic for when to emit that message is all wrong...
*/
At line 543 itup vector was filled by invalid tuple, so newly filled root
will contains only invalid tuples. Hence, reindex/vacuum full is required.
Sorry, I missed something, what is torn-page problem? Looking in your changes,
I decided, that now it needs to around by CRIT_SECTION any buffer/page changes?
--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-03-31 15:35:26 | Re: pgsql: Improve gist XLOG code to follow the coding |
Previous Message | User Ksrikanth | 2006-03-31 08:36:35 | bizgres - bizgres: Introduce release Release-0_9_2 |