Re: how to use pg_resetxlog

From: "Johnson, Shaunn" <SJohnson6(at)bcbsm(dot)com>
To: 'Tom Lane ' <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "'''pgsql-general(at)postgresql(dot)org ' ' '" <pgsql-general(at)postgresql(dot)org>
Subject: Re: how to use pg_resetxlog
Date: 2003-10-21 16:41:37
Message-ID: 73309C2FDD95D11192E60008C7B1D5BB05FEDADA@snt452.corp.bcbsm.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

--i'm still not sure what's going on.

--i did the following
[snip]
bash-2.05$ export PGDATA=/var/lib/pgsql/data/
bash-2.05$ echo $PGDATA
/var/lib/pgsql/data/
bash-2.05$ ./pg_resetxlog -x 11534336 $PGDATA
XLOG reset.

---

bash-2.05$ ./pg_resetxlog -n /var/lib/pgsql/data/
pg_control values:

pg_control version number: 71
Catalog version number: 200201121
Current log file id: 1014
Next log file segment: 57
Latest checkpoint's StartUpID: 25
Latest checkpoint's NextXID: 11534337
Latest checkpoint's NextOID: 2528235005
Database block size: 8192
Blocks per segment of large relation: 131072
LC_COLLATE: C
LC_CTYPE: C

[/snip]

--and even though the db says it's okay, i still
--get this :

[snip]
psql: FATAL 1: cannot open pg_attribute: No such file or directory
[/snip]

--i realize i must be getting rather boring right about
--now, but i really appreciate the info / guidance.
--thanks!

-X

-----Original Message-----
From: Tom Lane
To: Johnson, Shaunn
Cc: ''pgsql-general(at)postgresql(dot)org ' '
Sent: 10/21/03 12:03 PM
Subject: Re: [GENERAL] how to use pg_resetxlog

"Johnson, Shaunn" <SJohnson6(at)bcbsm(dot)com> writes:
> --installed the 7.2.1 tarball and configured / gmake / install
> --the pg_resetxlog. when i restarted postmaster, it says 'ok',
> --but when i tried to get in via the command line, i got this:
> [snip]
> psql: FATAL 1: cannot open pg_attribute: No such file or directory
> [/snip]

> --did i miss a step?

You probably used too small a value for the initial XID setting. You
need to redo pg_resetxlog with a -x value larger than the number of
transactions elapsed in your database. You can determine a suitable
number to use by looking in $PGDATA/pg_clog to see the largest file
number there (beware, they are in hex). Add one, then multiply by
1024*1024.

regards, tom lane

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2003-10-21 17:38:59 Re: Recomended FS
Previous Message Tom Lane 2003-10-21 16:03:19 Re: how to use pg_resetxlog