we've had a crash of our postgres database last night, it seems that
it's because we hit the max-file limit.  I'm at a point where I cannot
start up my database, and I don't know if there is any way for me to
recover it without restoring from a backup.  All i want to do is recover
from this and be able to start back up.  Any help please?

When I try to start the postmaster, i get:

[postgres@pgdb postgres]$  /usr/pg713/bin/postmaster -N 60 -i -F -B 2048
-D/moby/pgsql
DEBUG:  database system shutdown was interrupted at 2002-02-12 21:38:11
CST
DEBUG:  CheckPoint record at (2, 4255157328)
DEBUG:  Redo record at (2, 4255157328); Undo record at (0, 0); Shutdown
TRUE
DEBUG:  NextTransactionId: 25164741; NextOid: 51008237
DEBUG:  database system was not properly shut down; automatic recovery
in progress...
DEBUG:  redo starts at (2, 4255157392)
DEBUG:  ReadRecord: record with zero len at (2, 4255394508)
DEBUG:  redo done at (2, 4255394472)
FATAL 2:  XLogFlush: request is not satisfied
/usr/pg713/bin/postmaster: Startup proc 6119 exited with status 512 -
abort
[postgres@pgdb postgres]$ 


I'm using RH7.2, Dual Xeon 1.8ghz 2gb memroy and postgrep 7.1.3.  I've
included the first error messages from the postgres log, and then the
last messages where the database fails to start up.  

ERROR:  Load of file /usr/pg713/lib/plpgsql.so failed:
/usr/pg713/lib/plpgsql.so: cannot open shared object file: Too many open
files in system
FATAL 2:  cannot read block 767 of pg_log: Bad file descriptor
Server process (pid 27459) exited with status 512 at Wed Feb 13 01:29:09
2002
Terminating any active server processes...
NOTICE:  Message from PostgreSQL backend:
        The Postmaster has informed me that some other backend  died
abnormally and possibly corrupted shared memory.
        I have rolled back the current transaction and am       going to
terminate your database system connection and exit.
        Please reconnect to the database system and repeat your query.


... and then later on, things got really bad ...

Server processes were terminated at Wed Feb 13 01:46:40 2002
Reinitializing shared memory and semaphores
DEBUG:  database system was interrupted at 2002-02-13 01:45:33 CST
DEBUG:  CheckPoint record at (2, 4255157328)
DEBUG:  Redo record at (2, 4255157328); Undo record at (0, 0); Shutdown
TRUE
DEBUG:  NextTransactionId: 25164741; NextOid: 51008237
DEBUG:  database system was not properly shut down; automatic recovery
in progress...
DEBUG:  redo starts at (2, 4255157392)
DEBUG:  ReadRecord: record with zero len at (2, 4255394508)
DEBUG:  redo done at (2, 4255394472)
FATAL 2:  XLogFlush: request is not satisfied
/usr/pg713/bin/postmaster: Startup proc 27607 exited with status 512 -
abort
DEBUG:  database system shutdown was interrupted at 2002-02-13 01:46:40
CST
DEBUG:  CheckPoint record at (2, 4255157328)
DEBUG:  Redo record at (2, 4255157328); Undo record at (0, 0); Shutdown
TRUE
DEBUG:  NextTransactionId: 25164741; NextOid: 51008237
DEBUG:  database system was not properly shut down; automatic recovery
in progress...
DEBUG:  redo starts at (2, 4255157392)
DEBUG:  ReadRecord: record with zero len at (2, 4255394508)
DEBUG:  redo done at (2, 4255394472)
FATAL 2:  XLogFlush: request is not satisfied
/usr/pg713/bin/postmaster: Startup proc 28181 exited with status 512 -
abort

..
..



13 Feb 2002 09:14:40 -0700
Brian Hirt <bhirt@mobygames.com>
FATAL 2:�� XLogFlush: request is not satisfied
Brian Hirt <bhirt@mobygames.com> writes:
> DEBUG:  redo done at (2, 4255394472)
> FATAL 2:  XLogFlush: request is not satisfied

Oh, that old thing again :-(

What I would recommend is (1) run contrib/pg_resetxlog to get back into
a state where you can start the database.  Then (2) dump, initdb, reload
to be sure you are in a good state.  You might be able to get away
without step 2 but I'm not sure about it.

BTW, I think this particular problem is fixed in 7.2, or at least much
ameliorated.  As long as you have to dump/reload anyway, might be a good
time to update ...

			regards, tom lane

Wed, 13 Feb 2002 11:40:21 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] FATAL 2:  XLogFlush: request is not satisfied 
Hi,

> FATAL 2:  XLogFlush: request is not satisfied

Try pg_resetxlog from contrib.

greetings,
Bjoern



Wed, 13 Feb 2002 18:00:36 +0100
"Bjoern Metzdorf" <bm@turtle-entertainment.de>
Re: FATAL 2:XX XLogFlush: request is not satisfied