Re: AW: AW: AW: WAL-based allocation of XIDs is insecure - Mailing list pgsql-hackers

From Tom Lane
Subject Re: AW: AW: AW: WAL-based allocation of XIDs is insecure
Date
Msg-id 6360.983899890@sss.pgh.pa.us
Whole thread Raw
In response to Re: AW: AW: AW: WAL-based allocation of XIDs is insecure  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:
> The decision whether to log the whole buffer has to be atomic with the
> actual entry of the xlog record.  Unless we want to hold the xlog insert
> lock for the entire time that we're (eg) splitting a btree page, that
> means we log the buffer after the modification work is done, not before.

On third thought --- we could still log the original page contents and
the modification log record atomically, if what were logged in the xlog
record were (essentially) the parameters to the operation being logged,
not its results.  That is, make the log entry before you start doing the
mod work, not after.  This might also simplify redo, since redo would be
no different from the normal case.  I'm not sure why Vadim didn't choose
to do it that way; maybe there's some other fine point I'm missing.

In any case, it'd be a big code change and not something I'd want to
undertake at this point in the release cycle ... maybe we can revisit
this issue for 7.2.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Ian Lance Taylor
Date:
Subject: Re: mailing list messages
Next
From: Zeugswetter Andreas SB
Date:
Subject: AW: AW: AW: AW: WAL-based allocation of XIDs is insecur e