Обсуждение: [GENERAL] Invalid magic number 0000 in log file

Поиск
Список
Период
Сортировка

[GENERAL] Invalid magic number 0000 in log file

От
Moreno Andreo
Дата:
Hi everyone,

     a customer reported an issue starting Postgres on his machine after
reinstalling Windows (10 before, 10 now) without formatting (so there's
Windows and Windows.old) because of Windows not starting up anymore.

Before this reinstallation everything was OK.

Now here's the log

2017-08-25 19:34:49 CEST LOG:  database system was shut down at
2017-08-25 08:37:08 CEST
2017-08-25 19:34:49 CEST LOG:  invalid magic number 0000 in log file 1,
segment 53, offset 0
2017-08-25 19:34:49 CEST LOG:  invalid primary checkpoint record
2017-08-25 19:34:49 CEST LOG:  invalid secondary checkpoint record
2017-08-25 19:34:49 CEST PANIC:  could not locate a valid checkpoint record

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.
2017-08-25 19:34:50 CEST LOG:  startup process (PID 6652) exited with
exit code 3
2017-08-25 19:34:50 CEST LOG:  aborting startup due to startup process
failure

PostgreSQL is 9.1.6 32-bit. (I know, EOLed, but it's hard to keep up to
date about 1000 customer machines!)

I know that's related to XLOG files, but do not have idea on how to deal
with it. I had a quick googling but found nothing but "your files are
corrupted. You'd better initdb." Then I bumped into this (old) post from
Alvaro

https://www.postgresql.org/message-id/20070515173401.GB12731@alvh.no-ip.org

If it's  applicable, is it still valid or too many things have changed?

Thanks in advance,

Moreno.




Re: [GENERAL] Invalid magic number 0000 in log file

От
Peter Eisentraut
Дата:
On 8/25/17 14:24, Moreno Andreo wrote:
> I know that's related to XLOG files, but do not have idea on how to deal
> with it. I had a quick googling but found nothing but "your files are
> corrupted. You'd better initdb."

That's pretty much it.

You might not have to initdb if you have an uncorrupted copy of the WAL
files somewhere (i.e., a backup).  But then I would have concerns about
what else might be corrupted.

> Then I bumped into this (old) post from Alvaro
>
> https://www.postgresql.org/message-id/20070515173401.GB12731@alvh.no-ip.org
>
> If it's  applicable, is it still valid or too many things have changed?

That doesn't seem related.

--
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Re: [SPAM] Re: [GENERAL] Invalid magic number 0000 in log file

От
Moreno Andreo
Дата:
Il 25/08/2017 22:01, Peter Eisentraut ha scritto:
> On 8/25/17 14:24, Moreno Andreo wrote:
>> I know that's related to XLOG files, but do not have idea on how to deal
>> with it. I had a quick googling but found nothing but "your files are
>> corrupted. You'd better initdb."
> That's pretty much it.
Thanks, I'll report to the customer
>
> You might not have to initdb if you have an uncorrupted copy of the WAL
> files somewhere (i.e., a backup).  But then I would have concerns about
> what else might be corrupted.
Probably system was not booting because of a faulty hard disk, and the
fault also involved some WAL files. Once reinstalled, the system marked
as unusable the faulty sectors and everything is fine now, except for
what was corrupted before..........
I'll tell him to have a deep check of OS events and of the disk itself.

Thanks
Moreno.-