Skip site navigation (1) Skip section navigation (2)

Re: AW: WAL-based allocation of XIDs is insecure

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: AW: WAL-based allocation of XIDs is insecure
Date: 2001-03-06 15:20:35
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Zeugswetter Andreas SB  <ZeugswetterA(at)wien(dot)spardat(dot)at> writes:
>> 5. We will now run a new transaction with the same XID that was in use
>> before the crash.  If that transaction commits, then we have a tuple on
>> disk that will be considered valid --- and should not be.

> I do not think this is true. Before any modification to a page the
> original page will be written to the log (aka physical log).

Hmm.  Actually, what is written to the log is the *modified* page not
its original contents.  However, on studying the buffer manager I see
that it tries to fsync the log entry describing the last mod to a data
page before it writes out the page itself.  So perhaps that can be
relied on to ensure all XIDs known in the heap are known in the log.

However, I'd just as soon have the NEXTXID log records too to be doubly
sure.  I do now agree that we needn't fsync the NEXTXID records,

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2001-03-06 15:28:56
Subject: Re: AW: WAL-based allocation of XIDs is insecure
Previous:From: kovacszDate: 2001-03-06 15:07:36
Subject: pg_dump writes SEQUENCEs twice with -a

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group