Обсуждение: Database Corruption ?

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

Database Corruption ?

От
"Chris Stokes"
Дата:
Hi all,

I am having a number of problems with a customer of ours. This customer is in Thailand so I don't have good machine
directaccess to their computers. 

Scenario - we have a Java based POS system that we chose to run on Linux using PGSQL. This generally works quite ok,
Howeverat this particular customer they seem to be getting regular database corruptions requiring us to recreate the
databaseon the machine. The following are the errors displayed when trying to start the database 

[basspos@till1 root]$ postmaster -D /var/lib/pgsql/data

LOG:  database system shutdown was interrupted at 2003-11-12 14:46:30 ICT
LOG:  checkpoint record is at 1/812CFFC0
LOG:  redo record is at 1/812CFFC0; undo record is at 0/0; shutdown TRUE
LOG:  next transaction id: 4704776; next oid: 4616023
LOG:  database system was not properly shut down; automatic recovery in progress
LOG:  ReadRecord: unexpected pageaddr 1/7A2D0000 in log file 1, segment 129, offset 2949120
LOG:  redo is not required
PANIC:  XLogWrite: write request 1/812D0000 is past end of log 1/812D0000
LOG:  startup process (pid 4672) was terminated by signal 6
LOG:  aborting startup due to startup process failure

My questions are
What might cause this? I can't vouch for the users of these machines they may well be just powering them off without
propershutdown but I would hope that PGSQL is more robust than that. 

Is this repairable? I am currently getting them to just drop the database and start again.

Regards

Chris Stokes
Senior Systems Consultant
Phone: +61 3 8415 9305 (Direct)
Level 5 534 Church St
Richmond Vic 3121 Aust
chriss@basssoftware.com <mailto:chriss@basssoftware.com>

BASS     Software




Re: Database Corruption ?

От
Tom Lane
Дата:
"Chris Stokes" <ChrisS@BassSoftware.com> writes:
> PANIC:  XLogWrite: write request 1/812D0000 is past end of log 1/812D0000

This sure looks like the symptom of the 7.3.3 failure-to-restart bug.
If you are on 7.3.3 then an update to 7.3.4 will fix it.

            regards, tom lane

Re: Database Corruption ?

От
"Chris Stokes"
Дата:
Thanks Tom,

We use the RPM installation, if I do and rpm -Uvh for the packages to upgrade to the new 7.3.4 will that be sufficient
ordoes it require some sort of database upgrade or unload/reload? 

Thanks
Chris

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Friday, 14 November 2003 11:08 AM
To: Chris Stokes
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Database Corruption ?


"Chris Stokes" <ChrisS@BassSoftware.com> writes:
> PANIC:  XLogWrite: write request 1/812D0000 is past end of log 1/812D0000

This sure looks like the symptom of the 7.3.3 failure-to-restart bug.
If you are on 7.3.3 then an update to 7.3.4 will fix it.

            regards, tom lane

Re: Database Corruption ?

От
Tom Lane
Дата:
"Chris Stokes" <ChrisS@BassSoftware.com> writes:
> We use the RPM installation, if I do and rpm -Uvh for the packages to upgrade to the new 7.3.4 will that be
sufficientor does it require some sort of database upgrade or unload/reload? 

Not for an update within the 7.3.* series.  Just stop postmaster, update
RPM, start postmaster.

            regards, tom lane

Re: Database Corruption ?

От
"Chris Stokes"
Дата:
Thanks Tom,

Just one more question, Where can I read up on this bug, I would like to inform myself better before I promise a fix to
ourcustomer. 

Chris

Re: Database Corruption ?

От
Tom Lane
Дата:
"Chris Stokes" <ChrisS@BassSoftware.com> writes:
> Just one more question, Where can I read up on this bug, I would like to inform myself better before I promise a fix
toour customer. 

See the list archives from just before the 7.3.4 release.  The failure
occurs when the old WAL ends exactly on a page boundary --- it was a
byproduct of a fix in 7.3.3 for a different problem.

            regards, tom lane