From: | Denis Perchine <dyp(at)perchine(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Caching number of blocks in relation to avoi lseek. |
Date: | 2000-06-12 16:28:23 |
Message-ID: | 00061223344201.07937@dyp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Hello all,
While digging the code I found out quite interesting comment in
src/backend/access/heap/hio.c before function RelationPutHeapTupleAtEnd
* Eventually, we should cache the number of blocks in a relation somewhere.
* Until that time, this code will have to do an lseek to determine the number
* of blocks in a relation.
As far as I can see there's field rd_nblocks in Relation.
Question: is this field properly updated? Could it be used instead of RelationGetNumberOfBlocks
which calls lseek.
--
Sincerely Yours,
Denis Perchine
----------------------------------
E-Mail: dyp(at)perchine(dot)com
HomePage: http://www.perchine.com/dyp/
FidoNet: 2:5000/120.5
----------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2000-06-12 16:31:25 | Re: pgsql (Makefile) |
Previous Message | Tom Lane | 2000-06-12 16:18:15 | Re: pgsql (Makefile) |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2000-06-12 18:04:51 | Re: Patch for better large objects support |
Previous Message | Karel Zak | 2000-06-12 16:12:39 | Re: NO-CREATE-TABLE and NO-LOCK-TABLE |