471,354 Members | 2,208 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,354 software developers and data experts.

how to use pg_resetxlog

Howdy

Running PostgreSQL 7.2.1 on RedHat Linux

This past weekend, the RAID array took a hit and crashed
the database. I get a few errors like:

[snip]
DEBUG: invalid secondary checkpoint record
FATAL 2: unable to locate a valid checkpoint record
DEBUG: proc_exit(2)
DEBUG: shmem_exit(2)
DEBUG: exit(2)
DEBUG: reaping dead processes
DEBUG: startup process (pid 23543) exited with exit code 2
DEBUG: aborting startup due to startup process failure
[/snip]

I'm reading around and I see a bit of information about
using pg_resetxlog, but I don't know much about it.

1) How do you use pg_resetxlog?
2) Am I at risk of losing all of my data
if I use this?
3) Some info at groups.google.com suggest that I will
have to initdb - I figured that would be good anyway, but
how does pg_resetxlog play into this?

TIA!

-X

Nov 12 '05 #1
2 5956
"Johnson, Shaunn" <SJ*******@bcbsm.com> writes:
1) How do you use pg_resetxlog?
Read the README file for it.
2) Am I at risk of losing all of my data
if I use this?
You're at risk of having corrupted data, but I think that's true already
because of the disk failure.
3) Some info at groups.google.com suggest that I will
have to initdb - I figured that would be good anyway, but
how does pg_resetxlog play into this?


After pg_resetxlog you should be able to dump your database. I'd
recommend doing that, then initdb, reload the dump, look for
inconsistencies ...

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 12 '05 #2
"Johnson, Shaunn" <SJ*******@bcbsm.com> writes:
Running PostgreSQL 7.2.1 on RedHat Linux


PS: if you are still using 7.2.* then you should *definitely* be on
7.2.4. Since your DB is down anyway, this seems like a good time for an
upgrade ...

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by peter pilsl | last post: by
1 post views Thread by Lynn.Tilby | last post: by
2 posts views Thread by Geoffrey Kinnel | last post: by
4 posts views Thread by zhicheng wang | last post: by
9 posts views Thread by Matthew T. O'Connor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.