Re: cheaper snapshots

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Hannu Krosing <hannu(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: cheaper snapshots
Date: 2011-07-28 14:33:11
Message-ID: 8401.1311863591@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Thu, Jul 28, 2011 at 10:17 AM, Hannu Krosing <hannu(at)2ndquadrant(dot)com> wrote:
>> My hope was, that this contention would be the same than simply writing
>> the WAL buffers currently, and thus largely hidden by the current WAL
>> writing sync mechanisma.
>>
>> It really covers just the part which writes commit records to WAL, as
>> non-commit WAL records dont participate in snapshot updates.

> I'm confused by this, because I don't think any of this can be done
> when we insert the commit record into the WAL stream. It has to be
> done later, at the time we currently remove ourselves from the
> ProcArray. Those things need not happen in the same order, as I noted
> in my original post.

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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message pasman pasmański 2011-07-28 14:40:07 Netbeans and postgres
Previous Message Robert Haas 2011-07-28 14:23:33 Re: cheaper snapshots