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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "J(dot)R(dot) Nield" <jrnield(at)usol(dot)com>, 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-24 03:31:01
Message-ID: 200306240331.h5O3V1g15358@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


Should we add an Assert() to make it clear the current code is OK?

---------------------------------------------------------------------------

Tom Lane wrote:
> "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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-06-24 03:32:00 Re: compile failure on cvs tip --with-krb5
Previous Message Jan Wieck 2003-06-24 03:08:56 Re: Two weeks to feature freeze

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2003-06-24 03:33:46 Re: Patch for psql to avoid altering the PGresult strings
Previous Message Bruce Momjian 2003-06-24 03:11:54 Re: array support patch phase 1 patch