Re: [HACKERS] Subtraction carry bug in xlog.c in 7.3 and 7.4

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "J(dot)R(dot) Nield" <jrnield(at)usol(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, "pgsql-patches(at)postgresql(dot)org" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Subtraction carry bug in xlog.c in 7.3 and 7.4
Date: 2003-06-20 14:14:58
Message-ID: 17802.1056118498@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

"J.R. Nield" <jrnield(at)usol(dot)com> writes:
> The attached patches against 7.3 and 7.4 fix a subtraction carry bug in
> xlog.c.

This is simply a waste of cycles, because xrecoff can never be zero
(if it were, it'd be pointing at a page header, which is not a valid
record location). If you look around in the code, you'll note that
xrecoff==0 is actually used as an invalid-value flag in a couple of
contexts.

Can you point to anyplace where the behavior would change? If so
I think there's a deeper bug to fix.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Treat 2003-06-20 14:25:51 Re: Two weeks to feature freeze
Previous Message Tom Lane 2003-06-20 14:04:18 Re: Access to transaction status

Browse pgsql-patches by date

  From Date Subject
Next Message Nailah Ogeer 2003-06-20 15:00:42 Re: [HACKERS] psql
Previous Message Tom Lane 2003-06-20 14:01:15 Re: Patch to be verbose about being unable to read