Re: [PATCH] Prevent hanging on unreachable hosts on startup

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Ryan P(dot) Kelly" <rpkelly22(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: [PATCH] Prevent hanging on unreachable hosts on startup
Date: 2012-01-05 02:36:57
Message-ID: 3741.1325731017@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Ryan P. Kelly" <rpkelly22(at)gmail(dot)com> writes:
> The signal handler installed by setup_cancel_handler() will ignore
> attempts to exit psql should a host be unreachable.

Hm. That may be worth doing something about, but the proposed patch
seems more like a quick-and-dirty hack than a solution. The main
thing I don't like about it is that if we care about this scenario
during initial startup, we should also care about it during a \c
command, but just delaying the installation of the signal handler
won't fix that case.

More generally, what if the server becomes unreachable mid-session?
I'm not sure how much there is to be done about that case, since
there's probably no good way to distinguish it from a query that
takes a really long time. But if we're going to think about this,
we might as well think about all the cases.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Beattie 2012-01-05 04:04:26 Re: BUG #6380: dropdb gives error while loading shared libraries: liblber-2.3.so.0
Previous Message Ryan P. Kelly 2012-01-05 01:17:30 [PATCH] Prevent hanging on unreachable hosts on startup