Re: SSI atomic commit

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: "Dan Ports" <drkp(at)csail(dot)mit(dot)edu>,<pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SSI atomic commit
Date: 2011-07-07 18:59:17
Message-ID: 4E15BBB5020000250003F06C@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:

> Let's have two sequence numbers for each transaction: prepareSeqNo
> and commitSeqNo. prepareSeqNo is assigned when a transaction is
> prepared (in PreCommit_CheckForSerializableConflicts), and
> commitSeqNo is assigned when it's committed (in
> ReleasePredicateLocks). They are both assigned from one counter,
> LastSxactCommitSeqNo, so that is advanced twice per transaction,
> and prepareSeqNo is always smaller than commitSeqNo for a
> transaction. Modify operations that currently use commitSeqNo to
> use either prepareSeqNo or commitSeqNo, so that we err on the safe
> side.
>
> That yields a much smaller patch (attached). How does this look to
> you, am I missing anything?

Very clever. I'll need to study this and think about it. I'll try
to post a response before I go to bed tonight. Hopefully Dan can
weigh in, too. (I know he was traveling with limited Internet
access -- not sure about his return date.)

-Kevin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-07-07 19:06:46 Re: Avoid index rebuilds for no-rewrite ALTER TABLE ALTER TYPE
Previous Message Noah Misch 2011-07-07 18:55:28 Re: Avoid index rebuilds for no-rewrite ALTER TABLE ALTER TYPE