Add comment noting that hashm_procid in a hash index's metapage isn't
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 29 Jan 2007 23:22:59 +0000 (23:22 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 29 Jan 2007 23:22:59 +0000 (23:22 +0000)
actually used for anything.

src/backend/access/hash/hashpage.c

index e846e000070a9e06b16409ded52b6577615a0fba..cc181d3095e8dffaa698b3a5629aa0017b05fe02 100644 (file)
@@ -275,6 +275,11 @@ _hash_metapinit(Relation rel)
        metap->hashm_bmshift = i + BYTE_TO_BIT;
        Assert((1 << BMPG_SHIFT(metap)) == (BMPG_MASK(metap) + 1));
 
+       /*
+        * Label the index with its primary hash support function's OID.  This is
+        * pretty useless for normal operation (in fact, hashm_procid is not used
+        * anywhere), but it might be handy for forensic purposes so we keep it.
+        */
        metap->hashm_procid = index_getprocid(rel, 1, HASHPROC);
 
        /*