pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feeddb recovery (FATAL 2)
8+ messages / 2 participants
[nested] [flat]
* db recovery (FATAL 2)
@ 2002-05-07 14:22 Bojan Belovic <bbelovic@usa.net>
2002-05-08 05:59 ` Re: db recovery (FATAL 2) Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 8+ messages in thread
From: Bojan Belovic @ 2002-05-07 14:22 UTC (permalink / raw)
To: pgsql-admin
My database apparently crashed - don't know how or why. It happend in the
middle of the night so I wasn't around to troubleshoot it at the time. It
looks like it died during the scheduled vacuum.
Here's the log that gets generated when I attempt to bring it back up:
postmaster successfully started
DEBUG: database system shutdown was interrupted at 2002-05-07 09:35:35 EDT
DEBUG: CheckPoint record at (10, 1531023244)
DEBUG: Redo record at (10, 1531023244); Undo record at (10, 1531022908);
Shutdown FALSE
DEBUG: NextTransactionId: 29939385; NextOid: 9729307
DEBUG: database system was not properly shut down; automatic recovery in
progress...
DEBUG: redo starts at (10, 1531023308)
DEBUG: ReadRecord: record with zero len at (10, 1575756128)
DEBUG: redo done at (10, 1575756064)
FATAL 2: write(logfile 10 seg 93 off 15474688) failed: Success
/usr/bin/postmaster: Startup proc 1339 exited with status 512 - abort
Any suggestions? What are my options, other than doing a complete restore of
the DB from a dump (which is not really an option as the backup is not as
recent as it should be).
Thanks!
Bojan
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: db recovery (FATAL 2)
2002-05-07 14:22 db recovery (FATAL 2) Bojan Belovic <bbelovic@usa.net>
@ 2002-05-08 05:59 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 8+ messages in thread
From: Tom Lane @ 2002-05-08 05:59 UTC (permalink / raw)
To: Bojan Belovic <bbelovic@usa.net>; +Cc: pgsql-admin
Bojan Belovic <bbelovic@usa.net> writes:
> FATAL 2: write(logfile 10 seg 93 off 15474688) failed: Success
This would be what PG version?
Broad-jumping to conclusions, I'm going to guess (a) 7.1.0-7.1.2
and (b) you are out of disk space for the WAL logs.
If so, you'll need to free up 16MB or so to restart the postmaster,
and you'd be well advised to update to 7.1.3 before trying another
VACUUM.
regards, tom lane
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: db recovery (FATAL 2)
@ 2002-05-07 19:08 Bojan Belovic <bbelovic@usa.net>
0 siblings, 0 replies; 8+ messages in thread
From: Bojan Belovic @ 2002-05-07 19:08 UTC (permalink / raw)
To: pgsql-admin
Addition to my previous question...
If postgres has trouble recovering the database from the log, is it possible
to skip the recovery step and loose some recent data changes? If the loss is
relatively small, I think it would be acceptable (say we loose all the changes
in the last few hours). Not sure if the vacuum makes this a bigger problem?
Thanks!
--------
My database apparently crashed - don't know how or why. It happend in the
middle of the night so I wasn't around to troubleshoot it at the time. It
looks like it died during the scheduled vacuum.
Here's the log that gets generated when I attempt to bring it back up:
postmaster successfully started
DEBUG: database system shutdown was interrupted at 2002-05-07 09:35:35 EDT
DEBUG: CheckPoint record at (10, 1531023244)
DEBUG: Redo record at (10, 1531023244); Undo record at (10, 1531022908);
Shutdown FALSE
DEBUG: NextTransactionId: 29939385; NextOid: 9729307
DEBUG: database system was not properly shut down; automatic recovery in
progress...
DEBUG: redo starts at (10, 1531023308)
DEBUG: ReadRecord: record with zero len at (10, 1575756128)
DEBUG: redo done at (10, 1575756064)
FATAL 2: write(logfile 10 seg 93 off 15474688) failed: Success
/usr/bin/postmaster: Startup proc 1339 exited with status 512 - abort
Any suggestions? What are my options, other than doing a complete restore of
the DB from a dump (which is not really an option as the backup is not as
recent as it should be).
Thanks!
Bojan
My database apparently crashed - don't know how or why. It happend in the
middle of the night so I wasn't around to troubleshoot it at the time. It
looks like it died during the scheduled vacuum.
Here's the log that gets generated when I attempt to bring it back up:
postmaster successfully started
DEBUG: database system shutdown was interrupted at 2002-05-07 09:35:35 EDT
DEBUG: CheckPoint record at (10, 1531023244)
DEBUG: Redo record at (10, 1531023244); Undo record at (10, 1531022908);
Shutdown FALSE
DEBUG: NextTransactionId: 29939385; NextOid: 9729307
DEBUG: database system was not properly shut down; automatic recovery in
progress...
DEBUG: redo starts at (10, 1531023308)
DEBUG: ReadRecord: record with zero len at (10, 1575756128)
DEBUG: redo done at (10, 1575756064)
FATAL 2: write(logfile 10 seg 93 off 15474688) failed: Success
/usr/bin/postmaster: Startup proc 1339 exited with status 512 - abort
Any suggestions? What are my options, other than doing a complete restore of
the DB from a dump (which is not really an option as the backup is not as
recent as it should be).
Thanks!
Bojan
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: db recovery (FATAL 2)
@ 2002-05-08 14:00 Bojan Belovic <bbelovic@usa.net>
2002-05-08 16:46 ` Re: db recovery (FATAL 2) Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 8+ messages in thread
From: Bojan Belovic @ 2002-05-08 14:00 UTC (permalink / raw)
To: pgsql-admin
You are correct, it's 7.1.2 . However, the problem is not with disk space
(there's several gigs available), but there could be a problem with a bad
sector on one of the log files. If this is the case, and the log file is
corrupted, is there any way of recovering, even with a certain data loss?
Thanks!
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Bojan Belovic <bbelovic@usa.net> writes:
> > FATAL 2: write(logfile 10 seg 93 off 15474688) failed: Success
>
> This would be what PG version?
>
> Broad-jumping to conclusions, I'm going to guess (a) 7.1.0-7.1.2
> and (b) you are out of disk space for the WAL logs.
>
> If so, you'll need to free up 16MB or so to restart the postmaster,
> and you'd be well advised to update to 7.1.3 before trying another
> VACUUM.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: db recovery (FATAL 2)
2002-05-08 14:00 Re: db recovery (FATAL 2) Bojan Belovic <bbelovic@usa.net>
@ 2002-05-08 16:46 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 8+ messages in thread
From: Tom Lane @ 2002-05-08 16:46 UTC (permalink / raw)
To: Bojan Belovic <bbelovic@usa.net>; +Cc: pgsql-admin
Bojan Belovic <bbelovic@usa.net> writes:
> You are correct, it's 7.1.2 . However, the problem is not with disk space
> (there's several gigs available), but there could be a problem with a bad
> sector on one of the log files. If this is the case, and the log file is
> corrupted, is there any way of recovering, even with a certain data loss?
Hm. It's complaining about a write, not a read, so there is no lost
data (yet), even if your theory is correct. You might first try copying
the entire $PGDATA/pg_xlog directory somewhere else.
If nothing else avails, see contrib/pg_resetxlog. But that should be
your last resort not first.
regards, tom lane
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: db recovery (FATAL 2)
@ 2002-05-08 20:27 Bojan Belovic <bbelovic@usa.net>
2002-05-09 14:09 ` Re: db recovery (FATAL 2) Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 8+ messages in thread
From: Bojan Belovic @ 2002-05-08 20:27 UTC (permalink / raw)
To: pgsql-admin
It turns out it was a bad sector, and once the data was retreived and the
drive replaced, postgres was able to go through the startup process
sucessfully. Given that it did not report any errors on recovery, I suppose
there was no data loss, but even if there was some damage to the log file, it
should be minor - the crash happened at 6am, almost no activity, so I'm not
going to worry about that at all at this point.
Anyway, thank you very much for your help.
One quick question - you mentioned I should upgrade to 7.1.3 beofre I run
vacuum again. What are the known problems that "ask" for this?
Thanks again!
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Bojan Belovic <bbelovic@usa.net> writes:
> > You are correct, it's 7.1.2 . However, the problem is not with disk space
> > (there's several gigs available), but there could be a problem with a bad
> > sector on one of the log files. If this is the case, and the log file is
> > corrupted, is there any way of recovering, even with a certain data loss?
>
> Hm. It's complaining about a write, not a read, so there is no lost
> data (yet), even if your theory is correct. You might first try copying
> the entire $PGDATA/pg_xlog directory somewhere else.
>
> If nothing else avails, see contrib/pg_resetxlog. But that should be
> your last resort not first.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: db recovery (FATAL 2)
2002-05-08 20:27 Re: db recovery (FATAL 2) Bojan Belovic <bbelovic@usa.net>
@ 2002-05-09 14:09 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 8+ messages in thread
From: Tom Lane @ 2002-05-09 14:09 UTC (permalink / raw)
To: Bojan Belovic <bbelovic@usa.net>; +Cc: pgsql-admin
Bojan Belovic <bbelovic@usa.net> writes:
> One quick question - you mentioned I should upgrade to 7.1.3 beofre I run
> vacuum again. What are the known problems that "ask" for this?
WAL growth. My original theory was that you'd run out of disk space
because of a VACUUM trying to do a huge amount of work. In 7.1.2
the WAL can grow arbitrarily large during a long transaction...
There are some other not-unimportant bug fixes in 7.1.3 too, but that's
the one I was thinking of.
regards, tom lane
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: db recovery (FATAL 2)
@ 2002-05-09 15:34 Bojan Belovic <bbelovic@usa.net>
0 siblings, 0 replies; 8+ messages in thread
From: Bojan Belovic @ 2002-05-09 15:34 UTC (permalink / raw)
To: pgsql-admin
Just to make sure - given that there is plenty of space available (database is
slightly larger than 1GB and there is almost 10GB free), there should be no
problem with vacuum?
Or should I upgrade regardless? (I generally like to keep stable system
stable, unless I know there is a specific reason why I should change things in
the environment)
Thanks a lot,
Bojan
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Bojan Belovic <bbelovic@usa.net> writes:
> > One quick question - you mentioned I should upgrade to 7.1.3 beofre I run
> > vacuum again. What are the known problems that "ask" for this?
>
> WAL growth. My original theory was that you'd run out of disk space
> because of a VACUUM trying to do a huge amount of work. In 7.1.2
> the WAL can grow arbitrarily large during a long transaction...
>
> There are some other not-unimportant bug fixes in 7.1.3 too, but that's
> the one I was thinking of.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2002-05-09 15:34 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-05-07 14:22 db recovery (FATAL 2) Bojan Belovic <bbelovic@usa.net>
2002-05-08 05:59 ` Tom Lane <tgl@sss.pgh.pa.us>
2002-05-07 19:08 Re: db recovery (FATAL 2) Bojan Belovic <bbelovic@usa.net>
2002-05-08 14:00 Re: db recovery (FATAL 2) Bojan Belovic <bbelovic@usa.net>
2002-05-08 16:46 ` Tom Lane <tgl@sss.pgh.pa.us>
2002-05-08 20:27 Re: db recovery (FATAL 2) Bojan Belovic <bbelovic@usa.net>
2002-05-09 14:09 ` Tom Lane <tgl@sss.pgh.pa.us>
2002-05-09 15:34 Re: db recovery (FATAL 2) Bojan Belovic <bbelovic@usa.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox