Re: Proposal for CSN based snapshots - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Proposal for CSN based snapshots
Date
Msg-id CAA4eK1J8YTbE-qRmk=-OLGjDKhpn6+6e=LUbqxQ4qp=PV=4jsw@mail.gmail.com
Whole thread Raw
In response to Re: Proposal for CSN based snapshots  (Greg Stark <stark@mit.edu>)
List pgsql-hackers
On Tue, Aug 26, 2014 at 11:55 PM, Greg Stark <stark@mit.edu> wrote:
> Interesting analysis.
>
> I suppose the equivalent of hint bits would be to actually write the
> CSN of the transaction into the record when the hint bit is set.
>
> I don't immediately see how to make that practical. One thought would
> be to have a list of xids in the page header with their corresponding
> csn -- which starts to sound a lot like Oralce's "Interested
> Transaction List". But I don't see how to make that work for the
> hundreds of possible xids on the page.

Here we can limit the number of such entries (xid-csn pair) that
can exist in block header and incase it starts to overflow, it can
use some alternate location.  Another idea could be that reserve
the space whenever new transaction starts to operate in block
and update the CSN for the same later and incase the maximum
number of available slots gets filled up, we can either use alternate
location or may be block the new transaction until such a slot is
available, here I am assuming that Vacuum would clear the slots
in blocks as and when such transactions become visible to
everyone or may be the transaction which didn't find any slot can
also try to clear such slots.


With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Similar to csvlog but not really, json logs?
Next
From: Joachim Wieland
Date:
Subject: Re: pg_dump refactor patch to remove global variables