Question about OID and TCID - Mailing list pgsql-general

From Zhipan Wang
Subject Question about OID and TCID
Date
Msg-id 464718628.766821290847976572.JavaMail.root@mail-01.cse.ucsc.edu
Whole thread Raw
Responses Re: Question about OID and TCID
Re: Question about OID and TCID
List pgsql-general
Hi,

I want to access part of a table on the disk sequentially, i,e., when I get to a tuple in the table, I need to read
severalpages of data in the table starting from this tuple. I guess CTID could be translated to physical address on the
diskto retrieve this tuple, right? If so, how do I use CTID to retrieve a particular tuple (or a page) in SQL? Can I
useOID to do this equally efficiently? 

Another question is: when I update a tuple in a table, this tuple will get a new CTID and it leaves a gap at the old
CTID,and when I insert a new tuple, it's appended to the end of the table, so the gap is always there. Does this mean
itactually inserts a new tuple and the out-dated tuple still occupies the space? How can I write the updated tuple back
toits original position to utilize disk space more efficiently? 

Thanks!

pgsql-general by date:

Previous
From: Emanuel Calvo Franco
Date:
Subject: Re: array_agg + limit
Next
From: Dave Page
Date:
Subject: [ANNOUNCE] Just 2 days left to register for PGDay.EU 2010