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

From Tom Lane
Subject Re: How to simulate crashes of PostgreSQL?
Date
Msg-id 2455.1251233722@sss.pgh.pa.us
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
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Would it be worth for walwriter to grab a dozen of dummy fd's?

I don't think so.  As you point out, we could never positively guarantee
no ENFILE failures anyway.  If we were in an out-of-FDs situation, any
such cushion would get whittled down to nothing pretty quickly, too.

I've always thought that the fd.c layer is more about not having to
configure the code explicitly for max-files-per-process limits.  Once
you get into ENFILE conditions, even if Postgres manages to stay up,
everything else on the box is going to start falling over.  So the
sysadmin is likely to have to resort to a reboot anyway.

(Hm, I wonder if that sort of thing explains the complaints we
occasionally get about systems becoming completely nonresponsive under
load?  I'll bet you can't ssh into a machine that's up against the
ENFILE limit, for instance.)

            regards, tom lane

pgsql-general by date:

Previous
From: Vick Khera
Date:
Subject: Re: How to simulate crashes of PostgreSQL?
Next
From: Tom Lane
Date:
Subject: Re: PL/pgSQL infinite loop in "UPDATE/INSERT" example