Обсуждение: PostgreSQL terminated abnormally

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

PostgreSQL terminated abnormally

От
Oskars Ozols
Дата:
We were successfully running PostgreSQL 8.0 on Win2003 for several
months without downtime.
Then suddenly PostgreSQL crashed and there were following info in log file

2005-10-09 03:51:10 WARNING:  there is no transaction in progress

2005-10-09 03:51:10 WARNING:  there is no transaction in progress

2005-10-09 03:51:24 PANIC:  could not rename file "C:/Program
Files/PostgreSQL/8.0/data/pg_xlog/0000000100000000000000CD" to "C:/Program
Files/PostgreSQL/8.0/data/pg_xlog/0000000100000000000000D2" (initialization
of log file 0, segment 210): No such file or directory



This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

2005-10-09 03:51:24 LOG:  background writer process (PID 3448) was terminated
by signal 3

2005-10-09 03:51:24 LOG:  terminating any other active server processes

2005-10-09 03:51:24 WARNING:  terminating connection because of crash of
another server process

2005-10-09 03:51:24 DETAIL:  The postmaster has commanded this server process
to roll back the current transaction and exit, because another server process
exited abnormally and possibly corrupted shared memory.

2005-10-09 03:51:24 HINT:  In a moment you should be able to reconnect to the
database and repeat your command.

2005-10-09 03:51:24 WARNING:  terminating connection because of crash of
another server process

2005-10-09 03:51:24 DETAIL:  The postmaster has commanded this server process
to roll back the current transaction and exit, because another server process
exited abnormally and possibly corrupted shared memory.

2005-10-09 03:51:24 HINT:  In a moment you should be able to reconnect to the
database and repeat your command.

2005-10-09 03:51:24 WARNING:  terminating connection because of crash of
another server process

2005-10-09 03:51:24 DETAIL:  The postmaster has commanded this server process
to roll back the current transaction and exit, because another server process
exited abnormally and possibly corrupted shared memory.

2005-10-09 03:51:24 HINT:  In a moment you should be able to reconnect to the
database and repeat your command.

2005-10-09 03:51:24 WARNING:  terminating connection because of crash of
another server process

2005-10-09 03:51:24 DETAIL:  The postmaster has commanded this server process
to roll back the current transaction and exit, because another server process
exited abnormally and possibly corrupted shared memory.

2005-10-09 03:51:24 HINT:  In a moment you should be able to reconnect to the
database and repeat your command.

2005-10-09 03:51:24 WARNING:  terminating connection because of crash of
another server process

2005-10-09 03:51:24 DETAIL:  The postmaster has commanded this server process
to roll back the current transaction and exit, because another server process
exited abnormally and possibly corrupted shared memory.

2005-10-09 03:51:24 HINT:  In a moment you should be able to reconnect to the
database and repeat your command.

2005-10-09 03:51:24 LOG:  all server processes terminated; reinitializing

2005-10-09 03:51:24 LOG:  database system was interrupted at 2005-10-09
03:51:24 FLE Daylight Time

2005-10-09 03:51:24 LOG:  checkpoint record is at 0/CE030078

2005-10-09 03:51:24 LOG:  redo record is at 0/CE030078; undo record is at 0/0;
shutdown FALSE

2005-10-09 03:51:24 LOG:  next transaction ID: 140670456; next OID: 3537664

2005-10-09 03:51:24 LOG:  database system was not properly shut down;
automatic recovery in progress

2005-10-09 03:51:24 LOG:  record with zero length at 0/CE0300B8

2005-10-09 03:51:24 LOG:  redo is not required

2005-10-09 03:51:24 PANIC:  could not rename file "C:/Program
Files/PostgreSQL/8.0/data/pg_xlog/0000000100000000000000CD" to "C:/Program
Files/PostgreSQL/8.0/data/pg_xlog/0000000100000000000000D2" (initialization
of log file 0, segment 210): No such file or directory



This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

2005-10-09 03:51:24 LOG:  startup process (PID 4184) was terminated by signal
3

2005-10-09 03:51:24 LOG:  aborting startup due to startup process failure

2005-10-09 03:51:24 LOG:  logger shutting down


-------------------------------------------------------


What are the reasons for this error?



Re: PostgreSQL terminated abnormally

От
Tom Lane
Дата:
Oskars Ozols <oskars.ozols@di.lv> writes:
> We were successfully running PostgreSQL 8.0 on Win2003 for several
> months without downtime.
> Then suddenly PostgreSQL crashed and there were following info in log file

> 2005-10-09 03:51:24 PANIC:  could not rename file "C:/Program
> Files/PostgreSQL/8.0/data/pg_xlog/0000000100000000000000CD" to "C:/Program
> Files/PostgreSQL/8.0/data/pg_xlog/0000000100000000000000D2" (initialization
> of log file 0, segment 210): No such file or directory

This is a logically impossible failure: the only way to reach the point
at which this message is emitted (InstallXLogFileSegment) is if the
program just saw file 0000000100000000000000CD in that directory.  But
rename() failing with "No such file or directory" means the file *isn't*
there.  And it's not a case of someone else having deleted it in the
intervening microseconds, because the error is reproducible.

The only idea that comes to mind is that you've got an antivirus product
interfering with disk accesses.  We've seen reports recently of equally
bizarre failures that went away after disabling some antivirus program.

My own advice: get a real operating system ;-)

            regards, tom lane

Re: PostgreSQL terminated abnormally

От
Richard Huxton
Дата:
Oskars Ozols wrote:
>
> We were successfully running PostgreSQL 8.0 on Win2003 for several
> months without downtime.
> Then suddenly PostgreSQL crashed and there were following info in log file
[snip]

> 2005-10-09 03:51:24 PANIC:  could not rename file "C:/Program
> Files/PostgreSQL/8.0/data/pg_xlog/0000000100000000000000CD" to
> "C:/Program Files/PostgreSQL/8.0/data/pg_xlog/0000000100000000000000D2"
> (initialization of log file 0, segment 210): No such file or directory
[snip]
> 2005-10-09 03:51:24 LOG:  all server processes terminated; reinitializing
>
> 2005-10-09 03:51:24 LOG:  database system was interrupted at 2005-10-09
> 03:51:24 FLE Daylight Time
>
> 2005-10-09 03:51:24 LOG:  checkpoint record is at 0/CE030078
>
> 2005-10-09 03:51:24 LOG:  redo record is at 0/CE030078; undo record is
> at 0/0; shutdown FALSE
>
> 2005-10-09 03:51:24 LOG:  next transaction ID: 140670456; next OID: 3537664
>
> 2005-10-09 03:51:24 LOG:  database system was not properly shut down;
> automatic recovery in progress
>
> 2005-10-09 03:51:24 LOG:  record with zero length at 0/CE0300B8
>
> 2005-10-09 03:51:24 LOG:  redo is not required
>
> 2005-10-09 03:51:24 PANIC:  could not rename file "C:/Program
> Files/PostgreSQL/8.0/data/pg_xlog/0000000100000000000000CD" to
> "C:/Program Files/PostgreSQL/8.0/data/pg_xlog/0000000100000000000000D2"
> (initialization of log file 0, segment 210): No such file or directory

What's in your pg_xlog directory?

Oh, and which version of 8.0.x is it exactly?
--
   Richard Huxton
   Archonet Ltd