From: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)com>, Ants Aasma <ants(at)cybertec(dot)at>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Markus Wanner <markus(at)bluegap(dot)ch> |
Subject: | Re: Proposal for CSN based snapshots |
Date: | 2014-05-13 08:29:14 |
Message-ID: | 5371D7DA.3010902@vmware.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 05/13/2014 09:44 AM, Amit Kapila wrote:
> On Mon, May 12, 2014 at 7:26 PM, Heikki Linnakangas
> <hlinnakangas(at)vmware(dot)com> wrote:
>> In theory, we could use a snapshot LSN as the cutoff-point for
>> HeapTupleSatisfiesVisibility(). Maybe it's just because this is new, but
>> that makes me feel uneasy.
>
> To accomplish this won't XID-CSN map table be required and how will
> it be maintained (means when to clear and add a entry to that map table)?
Not sure I understand. The clog is a mapping from XID to CSN. What
vacuum needs to know is whether the xmin and/or xmax is visible to
everyone (and whether they committed or aborted). To determine that, it
needs the oldest still active snapshot LSN. That can be found by
scanning the proc array. It's pretty much the same as a regular MVCC
visibility check, but using the oldest still-active snapshot.
- Heikki
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2014-05-13 08:36:07 | Re: Proposal for CSN based snapshots |
Previous Message | Christoph Berg | 2014-05-13 08:27:16 | Re: Updating config.guess/config.sub for ppc64le |