Re: Significance of the magic number of btree pages..?

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Anil Kumar <anil_csir(at)yahoo(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Significance of the magic number of btree pages..?
Date: 2009-02-24 14:00:21
Message-ID: 49A3FD75.1080303@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Anil Kumar wrote:
> Hi to All,
> Iam new to the group and to postgresql. Currently Iam trying to understand how does the planner work by using gdb. During the execution of a plan I observed a variable "BTREE_MAGIC" which is defined 0x053162 and called, 'the magic number of btree pages'. I couldnt understand the concept behind the 'magic number' and the "0x053162". Can anyone kindly explain the significance of the 'magic number of btree pages' or refer to some document where I can get idea about this.

It's just a sanity check and a debugging aid, to let you check that a
b-tree metapage is indeed a b-tree metapage.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2009-02-24 14:20:18 Re: parallel restore
Previous Message Anil Kumar 2009-02-24 13:40:53 Significance of the magic number of btree pages..?