From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Rajeev rastogi <rajeev.rastogi@huawei.com>
Cc: Ants Aasma <ants@cybertec.at>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Markus Wanner <markus@bluegap.ch>
Subject: Re: Proposal for CSN based snapshots
Date: Tue, 13 May 2014 11:29:14 +0300
Message-ID: <5371D7DA.3010902@vmware.com> (raw)
In-Reply-To: <CAA4eK1Jf5=OJ0YwPE_1e8w12-MC9hWHarX5Do+gk_jZysujFdg@mail.gmail.com>
References: <CA+CSw_tEpJ=md1zgxPkjH6CWDnTDft4gBi=+P9SnoC+Wy3pKdA@mail.gmail.com>
<51B1CB35.4050406@bluegap.ch>
<CA+CSw_uSzXidemci-nU5fJY-qXD0DE0ZWz-j1ASTT_ffBjXo9Q@mail.gmail.com>
<51B6C97B.1070000@bluegap.ch>
<BF2827DCCE55594C8D7A8F7FFD3AB7713DDBC758@SZXEML508-MBX.china.huawei.com>
<5370D323.1070606@vmware.com>
<CAA4eK1Jf5=OJ0YwPE_1e8w12-MC9hWHarX5Do+gk_jZysujFdg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 05/13/2014 09:44 AM, Amit Kapila wrote:
> On Mon, May 12, 2014 at 7:26 PM, Heikki Linnakangas
> <hlinnakangas@vmware.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
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: hlinnakangas@vmware.com, amit.kapila16@gmail.com, rajeev.rastogi@huawei.com, ants@cybertec.at, markus@bluegap.ch
Subject: Re: Proposal for CSN based snapshots
In-Reply-To: <5371D7DA.3010902@vmware.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox