Re: SSI implementation question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dan Ports <drkp(at)csail(dot)mit(dot)edu>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: SSI implementation question
Date: 2011-10-22 22:34:07
Message-ID: 18331.1319322847@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dan Ports <drkp(at)csail(dot)mit(dot)edu> writes:
> On Wed, Oct 19, 2011 at 04:36:41PM -0400, Tom Lane wrote:
>> (2) as things stand, xact A need not be running in serializable mode ---
>> if B is serializable, does *that* break any assumptions?

> [taking these in opposite order]

> Yes, I think that's going to be a problem. The obvious case where it's
> clearly not going to work is if A is older than the oldest active
> serializable xact (i.e. SxactGlobalXmin would have to move backwards).
> It's probably possible to make it work when that's not the case, but I
> think it's better to require A to be serializable -- if nothing else,
> it's a far simpler rule to document!

> There is another case that could be problematic, if A was READ ONLY,
> and B isn't. It sounds to me like that would also be a reasonable thing
> to forbid.

I've committed the synchronized-snapshots patch with those two
restrictions, ie, to import a snapshot into a serializable transaction
(1) the source transaction must be serializable (and must still be
running, of course);
(2) you can't import a read-only transaction's snapshot into a
read-write serializable transaction.

I don't understand the SSI code well enough to tell if this is
sufficient or not, so I hope you guys will take a closer look at the
issue when you have time.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thom Brown 2011-10-23 00:19:07 Re: synchronized snapshots
Previous Message Tom Lane 2011-10-22 22:25:52 Re: synchronized snapshots