From: Alexander Kuzmenkov <a.kuzmenkov@postgrespro.ru>
To: Michael Paquier <michael.paquier@gmail.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Andres Freund <andres@anarazel.de>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Alexander Korotkov <a.korotkov@postgrespro.ru>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>
Cc: Jeff Davis <pgsql@j-davis.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Greg Stark <stark@mit.edu>
Cc: Andres Freund <andres@2ndquadrant.com>
Cc: Rajeev rastogi <rajeev.rastogi@huawei.com>
Cc: Markus Wanner <markus@bluegap.ch>
Cc: Ants Aasma <ants@cybertec.at>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: obartunov <obartunov@postgrespro.ru>
Cc: Teodor Sigaev <teodor@postgrespro.ru>
Cc: Borodin Vladimir <root@simply.name>
Subject: Re: Proposal for CSN based snapshots
Date: Wed, 21 Jun 2017 14:48:38 +0300
Message-ID: <725708e3-49f9-f26c-89bc-e8d410dcba09@postgrespro.ru> (raw)
In-Reply-To: <CAB7nPqQYh6zEeJ9PWMsNvdRC9rj=Q8XKw6Ew1VCLiun1=aUo-Q@mail.gmail.com>
References: <53FD7DCC.5020005@vmware.com>
<CAPpHfdsCUb4qBUHzfqNsUYALC_LEpHD9qB-ozvS_8esv1edCTw@mail.gmail.com>
<CANP8+jLAe3Smtq3FF49DMvuxtfoRQcCPQn28GEKuwAb2J41XCA@mail.gmail.com>
<CA+Tgmob1DmDsvc7iyd0SY5j4SFdesDwoef36bxG1pE_s1JQXOQ@mail.gmail.com>
<CANP8+jLyhL92eJi7RVX_yvbKjxm9=OBKcmNnodaYmeE+o2i1+Q@mail.gmail.com>
<CAPpHfdv7BMwGv=OfUg3S-jGVFKqHi79pR_ZK1Wsk-13oZ+cy5g@mail.gmail.com>
<69041c5a-ec60-3c54-49d0-5df071b27f52@iki.fi>
<389b45d1-f4f8-a333-03ef-efb94c8d6087@iki.fi>
<CA+TgmobaHXcz+5cN9pFS5rVQNkxg9fuCD0poypas_auhUB4VDQ@mail.gmail.com>
<ccbbd4e3-2999-cf29-96d0-66935c4ca9aa@iki.fi>
<20160822173852.ivt5to662zoc5rfs@alap3.anarazel.de>
<4495d803-6ff2-488b-f58d-bab990ee660e@iki.fi>
<0c4fb3ae-a828-5f07-79e3-0728e31e31b1@iki.fi>
<CAA4eK1LDANwOzaX+PJZB7zByeDgjd6xJBBmL1UArziD9G1OfaQ@mail.gmail.com>
<CAB7nPqQYh6zEeJ9PWMsNvdRC9rj=Q8XKw6Ew1VCLiun1=aUo-Q@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 21.06.2017 04:48, Michael Paquier wrote:
> There has not been much activity on this thread for some time, and I
> mentioned my intentions to some developers at the last PGCon. But I am
> planning to study more the work that has been done here, with as
> envisaged goal to present a patch for the first CF of PG11. Lots of
> fun ahead.
Hi Michael,
Glad to see you working on this! I've been studying this topic too.
Attached you can find a recently rebased version of Heikki's v4 patch.
I also fixed a bug that appeared on report-receipts isolation test:
XidIsConcurrent should report that a transaction is concurrent to ours
when its csn equals our snapshotcsn.
There is another bug where multiple tuples with the same primary key
appear after a pgbench read-write test. Querying pgbench_branches with
disabled index scans, I see several tuples with the same 'bid' value.
Usually they do not touch the index so there are no errors. But
sometimes HOT update is not possible and it errors out with violation of
unique constraint, which is how I noticed it. I can't reproduce it on my
machine and have to use a 72-core one.
For now I can conclude that the oldestActiveXid is not always updated
correctly. In TransactionIdAsyncCommitTree, just before the transaction
sets clog status, its xid can be less than oldestActiveXid. Other
transactions are seeing it as aborted for some time before it writes to
clog (see TransactionIdGetCommitSeqNo). They can update a tuple it
deleted, and that leads to duplication. Unfortunately, I didn't have
time yet to investigate this further.
--
Alexander Kuzmenkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackersAttachments:
csn-5.patch.gz (application/gzip, 102.1K) download
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: a.kuzmenkov@postgrespro.ru, michael.paquier@gmail.com, hlinnaka@iki.fi, andres@anarazel.de, robertmhaas@gmail.com, a.korotkov@postgrespro.ru, simon@2ndquadrant.com, dilipbalaut@gmail.com, pgsql@j-davis.com, alvherre@2ndquadrant.com, stark@mit.edu, andres@2ndquadrant.com, rajeev.rastogi@huawei.com, markus@bluegap.ch, ants@cybertec.at, bruce@momjian.us, obartunov@postgrespro.ru, teodor@postgrespro.ru, root@simply.name
Subject: Re: Proposal for CSN based snapshots
In-Reply-To: <725708e3-49f9-f26c-89bc-e8d410dcba09@postgrespro.ru>
* 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