Unix Technical Forum

About index_build

This is a discussion on About index_build within the pgsql Hackers forums, part of the PostgreSQL category; --> Hi, I have found comments in backend/catalog/index.c, that index_build closes the passed rels ( heapRelation and indexRelation ). But ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 04:21 AM
Alexey Slynko
 
Posts: n/a
Default About index_build

Hi,

I have found comments in backend/catalog/index.c, that
index_build closes the passed rels ( heapRelation and indexRelation ).
But in backend/access/nbtree/nbtree.c I see something like this:

if (IsNormalProcessingMode())
{
....
heap_close(heap, NoLock);
index_close(index);
....
}

Why it is not like

if (IsNormalProcessingMode())
{
....
heap_close(heap, NoLock);
index_close(index);
....
}
else {
heap_close(heap, NoLock);
index_close(index);
}

Is it a bug or feature ?

Alexey Slynko
E-mail: slynko@tronet.ru


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-11-2008, 04:21 AM
Tom Lane
 
Posts: n/a
Default Re: About index_build

Alexey Slynko <slynko@tronet.ru> writes:
> I have found comments in backend/catalog/index.c, that
> index_build closes the passed rels ( heapRelation and indexRelation ).


Bootstrap mode does it differently. I've never really felt motivated to
understand why in any detail. Presumably it was once *necessary* for
bootstrap to behave like that, and maybe it still is or maybe not.
It ain't broke so why fix it ...

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:47 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com