Re: how to use pg_resetxlog - Mailing list pgsql-general

From Johnson, Shaunn
Subject Re: how to use pg_resetxlog
Date
Msg-id 73309C2FDD95D11192E60008C7B1D5BB05FEDADA@snt452.corp.bcbsm.com
Whole thread Raw
In response to how to use pg_resetxlog  ("Johnson, Shaunn" <SJohnson6@bcbsm.com>)
Responses Re: how to use pg_resetxlog  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@postgresql.org ' '
Sent: 10/21/03 12:03 PM
Subject: Re: [GENERAL] how to use pg_resetxlog

"Johnson, Shaunn" <SJohnson6@bcbsm.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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: how to use pg_resetxlog
Next
From: Tom Lane
Date:
Subject: Re: how to use pg_resetxlog