Re: How to simulate crashes of PostgreSQL? - Mailing list pgsql-general

From Vick Khera
Subject Re: How to simulate crashes of PostgreSQL?
Date
Msg-id 2968dfd60908251102g2dc2209ak5c71d1c229ae6892@mail.gmail.com
Whole thread Raw
In response to Re: How to simulate crashes of PostgreSQL?  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: How to simulate crashes of PostgreSQL?
List pgsql-general
On Tue, Aug 25, 2009 at 1:09 PM, Alvaro
Herrera<alvherre@commandprompt.com> wrote:
> Vick Khera wrote:
>> On Sat, Aug 22, 2009 at 6:55 PM, Greg Sabino Mullane<greg@turnstep.com> wrote:
>> > A server crash is a pretty rare event in the Postgres world, so I
>> > would not spend too many cycles on this...
>>
>> I had one the other day caused by server resource issues: I ran out of
>> file descriptors when I had a very large surge in activity.  Pg
>> rightfully panicked and disconnected all my clients.
>
> PG is not supposed to crash when it runs out of file descriptors.  In
> fact there's a whole abstraction layer to ensure this does not happen.
> What you saw was either misconfiguration or a bug somewhere (for example
> maybe you have untrusted functions that try to open files?)

From my syslog:

Aug 21 15:11:13 d01 postgres[12037]: [156-1] PANIC:  could not open
file "pg_xlog/00000001000013E300000014" (log file 5091, segment 20):
Too many open files in system

Then all other processes did this:

Aug 21 15:11:15 d01 postgres[38452]: [71-1] WARNING:  terminating
connection because of crash of another server process

Then recovery began.  Luckily it only took 3 minutes because I limit
the number of log segments when in production mode.

Seems to me to be a part of the core server that caused the panic, not
any external functions (only external modules I use are pl/pgsql and
slony1).

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: How to simulate crashes of PostgreSQL?
Next
From: Tom Lane
Date:
Subject: Re: How to simulate crashes of PostgreSQL?