Re: Getting rid of cmin and cmax - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Getting rid of cmin and cmax
Date
Msg-id 451005BB.5050202@enterprisedb.com
Whole thread Raw
In response to Re: Getting rid of cmin and cmax  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Getting rid of cmin and cmax  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Heikki Linnakangas <heikki@enterprisedb.com> writes:
>   
>> I'm thinking of removing cmin and cmax, and keeping that information in 
>> backend-private memory instead.
>>     
>
> I don't believe you can remove *both*.  What's been discussed is
> removing one of them, by letting the field represent a lookup key for an
> in-memory structure in the infrequent case that xmin and xmax are both
> the current xact.  You solve the table size problem by only having one
> entry for each unique cmin/cmax pair in use.
>   

That's another possibility, but removing both cmin and cmax has also 
been discussed. It's also mentioned in the TODO item:
> One possible solution is to create a phantom cid which represents a 
cmin/cmax pair and is stored in local memory. *Another idea is to store 
both cmin and cmax only in local memory.*

Saving 4 bytes per tuple with the phantom cid is nice, but saving 8 
bytes (assuming we get rid of xvac in the future, or overlay it with 
xmin for example) is even better.

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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Getting rid of cmin and cmax
Next
From: Heikki Linnakangas
Date:
Subject: Re: Incrementally Updated Backup