WAL logging of heap_mark4update

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: pgsql-hackers(at)postgresql(dot)org
Subject: WAL logging of heap_mark4update
Date: 2005-01-15 21:32:29
Message-ID: 20050115213229.GA26259@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hackers,

In access/heap/heapam.c, in heap_mark4update(), there's a comment that
states

/*
* XLOG stuff: no logging is required as long as we have no
* savepoints. For savepoints private log could be used...
*/

Is this still true in light of 8.0's savepoints? If it isn't, maybe
it's a good idea to update the comment. I don't really understand the
issue: I assume that since the marking changes the page on disk, it
would need to be WAL-logged; however, since the change needs not be
permanent because the lock doesn't need to be preserved across a crash,
we just skip it.

I think the comment was made assuming that savepoints would be
implemented using REDO, and that in our multiple-Xid design does not
hold. So it's inaccurate. Am I right?

In any case I'm contemplating changing exclusive row locks to use
LockAcquire, and supporting shared row locks using the same mechanism.
All this per previous discussion on -hackers. We could get rid of
heap_mark4update if that's done, right?

--
Alvaro Herrera (<alvherre[(at)]dcc(dot)uchile(dot)cl>)
"Saca el libro que tu religin considere como el indicado para encontrar la
oracin que traiga paz a tu alma. Luego rebootea el computador
y ve si funciona" (Carlos Ducls)

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2005-01-15 21:34:18 Re: FATAL: catalog is missing 1 attribute(s) for relid
Previous Message Tom Lane 2005-01-15 21:20:13 Re: FATAL: catalog is missing 1 attribute(s) for relid 16396