Re: Strange problem when upgrading to 7.2 with pg_upgrade.

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: Brian Hirt <bhirt(at)mobygames(dot)com>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Strange problem when upgrading to 7.2 with pg_upgrade.
Date: 2002-02-22 05:02:57
Message-ID: 200202220502.g1M52vK20660@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Brian Hirt <bhirt(at)mobygames(dot)com> writes:
> > I decided to try the pg_upgrade program, something I usually never do.
>
> > FATAL 2: read of clog file 0, offset 139264 failed: Success
>
> Could we see ls -l $PGDATA/pg_clog?
>
> I suspect that pg_upgrade has neglected to make sure the clog is long
> enough.

Here is the code that sets the transaction id. Tom, does pg_resetxlog
handle pg_clog file creation properly?

# Set this so future backends don't think these tuples are their own
# because it matches their own XID.
# Commit status already updated by vacuum above
# Set to maximum XID just in case SRC wrapped around recently and
# is lower than DST's database

if [ "$SRC_XID" -gt "$DST_XID" ]
then MAX_XID="$SRC_XID"
else MAX_XID="$DST_XID"
fi

pg_resetxlog -x "$MAX_XID" "$PGDATA"
if [ "$?" -ne 0 ]
then echo "Unable to set new XID. Exiting." 1>&2
exit 1
fi

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc Munro 2002-02-22 05:07:27 Re: point in time recovery and moving datafiles online
Previous Message Bruce Momjian 2002-02-22 04:58:11 Re: Solaris ISM Testing