pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ryan P. Kelly <rpkelly22@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: [PATCH] Prevent hanging on unreachable hosts on startup
Date: Wed, 04 Jan 2012 21:36:57 -0500
Message-ID: <3741.1325731017@sss.pgh.pa.us> (raw)
In-Reply-To: <20120105011730.GA26760@llserver.lakeliving.com>
References: <20120105011730.GA26760@llserver.lakeliving.com>

"Ryan P. Kelly" <rpkelly22@gmail.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



view thread (6+ messages)  latest in thread

Message-ID: <3741.1325731017@sss.pgh.pa.us>
Permalink:  ../3741.1325731017@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3741.1325731017@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, rpkelly22@gmail.com
  Subject: Re: [PATCH] Prevent hanging on unreachable hosts on startup
  In-Reply-To: <3741.1325731017@sss.pgh.pa.us>
  References: <20120105011730.GA26760@llserver.lakeliving.com> <3741.1325731017@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox