pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Jeff Davis <pgsql@j-davis.com>
To: Heikki Linnakangas <hlinnakangas@vmware.com>
Cc: Greg Stark <stark@mit.edu>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@2ndquadrant.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Bruce Momjian <bruce@momjian.us>
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, 26 Aug 2014 10:58:55 -0700
Message-ID: <1409075935.2335.358.camel@jeff-desktop> (raw )
In-Reply-To: <53FC6545.7000501@vmware.com >
References: <51B6C97B.1070000@bluegap.ch >
<BF2827DCCE55594C8D7A8F7FFD3AB7713DDBC758@SZXEML508-MBX.china.huawei.com >
<5370D323.1070606@vmware.com >
<20140512144112.GB9619@awork2.anarazel.de >
<5370E267.2020904@vmware.com >
<20140515183436.GD25053@momjian.us >
<CA+TgmoYiqga4KWz_1=O8D6ivmTAJfY=-fxO6Nk+D-o3M0M60=Q@mail.gmail.com >
<20140515200632.GB16014@awork2.anarazel.de >
<20140515213714.GB7857@eldon.alvh.no-ip.org >
<53889CCB.7030005@vmware.com >
<20140530152721.GC30516@awork2.anarazel.de >
<5388D02D.6040305@vmware.com >
<CA+TgmoZ4cP_1Pavwn+VX74_ksDhHf-whO5FFR1j+NdZqONu8MA@mail.gmail.com >
<CAM-w4HMG-YeTfWc3r_excej3Kd04q4zDDXR0hxShVbij211ABA@mail.gmail.com >
<539AD153.9000004@vmware.com >
<1409043789.2335.330.camel@jeff-desktop >
<53FC6545.7000501@vmware.com >
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On Tue, 2014-08-26 at 13:45 +0300, Heikki Linnakangas wrote:
> My current thinking is that access to the csnlog will need to be made
> faster. Currently, it's just another SLRU, but I'm sure we can do better
> than that. Or add a backend-private cache on top of it; that might
> already alleviate it enough..
Aren't those the same ideas that have been proposed for eliminating hint
bits?
If this patch makes taking snapshots much faster, then perhaps it's
enough incentive to follow through on one of those ideas. I am certainly
open to removing hint bits (which was probably clear from earlier
discussions) if there are significant wins elsewhere and the penalty is
not too great.
To continue the discussion on this patch, let's assume that we make
TransactionIdGetCommitLSN sufficiently fast. If that's the case, can't
we make HeapTupleSatisfiesMVCC look more like:
LsnMin = TransactionIdGetCommitLSN(xmin);
if (!COMMITLSN_IS_COMMITTED(LsnMin))
LsnMin = BIG_LSN;
LsnMin = TransactionIdGetCommitLSN(xmin);
if (!COMMITLSN_IS_COMMITTED(LsnMin))
LsnMin = BIG_LSN;
return (snapshot->snapshotlsn >= LsnMin &&
snapshot->snapshotlsn < LsnMax);
There would need to be some handling for locked tuples, or tuples
related to the current transaction, of course. But I still think it
would turn out simpler; perhaps by enough to save a few cycles.
Regards,
Jeff Davis
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
view thread (113+ messages) latest in thread
Message-ID: <1409075935.2335.358.camel@jeff-desktop>
Permalink: ../1409075935.2335.358.camel@jeff-desktop/
Also on: postgresql.org/message-id/1409075935.2335.358.camel@jeff-desktop
copy link · copy postgr.es
reply 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: pgsql@j-davis.com, hlinnakangas@vmware.com, stark@mit.edu, robertmhaas@gmail.com, andres@2ndquadrant.com, alvherre@2ndquadrant.com, bruce@momjian.us, rajeev.rastogi@huawei.com, ants@cybertec.at, markus@bluegap.ch
Subject: Re: Proposal for CSN based snapshots
In-Reply-To: <1409075935.2335.358.camel@jeff-desktop>
* 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