Re: pgsql: Improve gist XLOG code to follow the coding
От | Teodor Sigaev |
---|---|
Тема | Re: pgsql: Improve gist XLOG code to follow the coding |
Дата | |
Msg-id | 442CF7DB.3040800@sigaev.ru обсуждение исходный текст |
Ответ на | pgsql: Improve gist XLOG code to follow the coding rules needed to (tgl@postgresql.org (Tom Lane)) |
Ответы |
Re: pgsql: Improve gist XLOG code to follow the coding
|
Список | 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 по дате отправления: