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

_RollbackFunc : dead code?

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: _RollbackFunc : dead code?
Date: 2005-03-27 19:39:17
Message-ID: 20050327193917.GA14232@dcc.uchile.cl (view raw or flat)
Thread:
Lists: pgsql-hackers
While trying to grok heap_update I came again across the
_heap_unlock_tuple function.  This code apparently tries to save a XLog
round while trying to mark a tuple for update, by registering a
"rollback callback", which would unmark the tuple in case the
transaction is rolled back.

Turns out the callback is never called at all.  So the code is dead
code.

Also, it claims that by marking t_infomask with a special 
HEAP_XMAX_UNLOGGED bit, this trick would not suffer across a system
crash, because tqual routines would check this bit (comments in the code
don't specify what would the routines do with it).

Turns out tqual routines never check the bit.  In fact, the bit is never
checked at all, nowhere in the code: heap_update sets it and then
unsets it, but that's all.

So I think this is dead code.  The attached patch removes it.

-- 
Alvaro Herrera (<alvherre[(at)]dcc(dot)uchile(dot)cl>)
Maybe there's lots of data loss but the records of data loss are also lost.
(Lincoln Yeoh)

Responses

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2005-03-27 19:42:39
Subject: Re: Making oidvector and int2vector variable-length
Previous:From: Devrim GUNDUZDate: 2005-03-27 19:31:18
Subject: Re: pg_dump issue : Cannot drop a non-existent(?) trigger

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