Re: cheaper snapshots - Mailing list pgsql-hackers

From Tom Lane
Subject Re: cheaper snapshots
Date
Msg-id 25470.1311868638@sss.pgh.pa.us
Whole thread Raw
In response to Re: cheaper snapshots  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: cheaper snapshots
Re: cheaper snapshots
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, Jul 28, 2011 at 10:33 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> But should we rethink that?  Your point that hot standby transactions on
>> a slave could see snapshots that were impossible on the parent was
>> disturbing.  Should we look for a way to tie "transaction becomes
>> visible" to its creation of a commit WAL record?  I think the fact that
>> they are not an indivisible operation is an implementation artifact, and
>> not a particularly nice one.

> Well, I agree with you that it isn't especially nice, but it seems
> like a fairly intractable problem.  Currently, the standby has no way
> of knowing in what order the transactions became visible on the
> master.

Right, but if the visibility order were *defined* as the order in which
commit records appear in WAL, that problem neatly goes away.  It's only
because we have the implementation artifact that "set my xid to 0 in the
ProcArray" is decoupled from inserting the commit record that there's
any difference.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: cheaper snapshots
Next
From: Hannu Krosing
Date:
Subject: Re: cheaper snapshots