Thread: Needs advice on error detection

Needs advice on error detection

From
"S. Horio"
Date:
While using PostgreSQL 8.1.4 for Windows on Windows XP (SP2),
the following errors had occurred.

-----
2007-10-11 12:38:21 LOG:  autovacuum: processing database "hoge"
2007-10-11 12:38:21 ERROR:  xlog flush request 0/2BEB2198 is not satisfied --- flushed only to 0/2BE32740
2007-10-11 12:38:21 CONTEXT:  writing block 205 of relation 1663/18096/27212
2007-10-11 12:38:22 ERROR:  xlog flush request 0/2BEB6A70 is not satisfied --- flushed only to 0/2BE32740
2007-10-11 12:38:22 CONTEXT:  writing block 206 of relation 1663/18096/27212
2007-10-11 12:38:23 ERROR:  xlog flush request 0/2BEBB1B8 is not satisfied --- flushed only to 0/2BE32740
2007-10-11 12:38:23 CONTEXT:  writing block 207 of relation 1663/18096/27212
...
2007-10-11 14:11:36 ERROR:  xlog flush request 0/2C27ABB8 is not satisfied --- flushed only to 0/2C25ED60
2007-10-11 14:11:36 CONTEXT:  writing block 258 of relation 1663/18096/27212
2007-10-11 14:11:36 WARNING:  could not write block 258 of 1663/18096/27212
2007-10-11 14:11:36 DETAIL:  Multiple failures --- write error may be permanent.
2007-10-11 14:11:36 ERROR:  xlog flush request 0/2C27ABB8 is not satisfied --- flushed only to 0/2C25ED60
2007-10-11 14:11:36 CONTEXT:  writing block 258 of relation1663/18096/27212
2007-10-11 14:11:36 WARNING:  could not write block 258 of 1663/18096/27212
2007-10-11 14:11:36 DETAIL:  Multiple failures --- write error may be permanent.
2007-10-11 14:11:36 LOG:  received fast shutdown request
2007-10-11 14:11:36 LOG:  shutting down
2007-10-11 14:11:36 PANIC:  xlog flush request 0/2C27ABB8 is not satisfied --- flushed only to 0/2C25ED60
2007-10-11 14:11:36 CONTEXT:  writing block 258 of relation 1663/18096/27212
-----

We were using pg_ctl to start up PostgreSQL instead of using
Windows Services. And we weren't shutting down the database
before shutting down the OS. Because of that, we think that
we damaged the disk blocks which were used by the database. Since
our client application did not receive the error, we think
that the error was started during the auto vacuum. In order to
detect these errors, is it possible to force database to
be halted as a PANIC state or it is possible to make this kind
of unrecoverable errors to be sent to existing client connections?
Also, is it common to get these errors when database was not
properly shutdown before halting an OS?

-Best Regards,


---
Shigenori Horio                    360 N. Sepulveda Blvd., Suite 1040
Twin Sun Inc.                                    El Segundo, CA 90245
shorio@twinsun.com     Tel: (310) 524-1800 ext 5, Fax: (310) 524-1818