Re: pgsql: Improve gist XLOG code to follow the coding - Mailing list pgsql-committers

From Teodor Sigaev
Subject Re: pgsql: Improve gist XLOG code to follow the coding
Date
Msg-id 442CF7DB.3040800@sigaev.ru
Whole thread Raw
In response to pgsql: Improve gist XLOG code to follow the coding rules needed to  (tgl@postgresql.org (Tom Lane))
Responses Re: pgsql: Improve gist XLOG code to follow the coding
List 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@sigaev.ru
                                                    WWW: http://www.sigaev.ru/

pgsql-committers by date:

Previous
From: ksrikanth@pgfoundry.org (User Ksrikanth)
Date:
Subject: bizgres - bizgres: Introduce release Release-0_9_2
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Improve gist XLOG code to follow the coding