psql sets up cancel handler very early

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: psql sets up cancel handler very early
Date: 2013-05-14 15:35:36
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Sometimes, the psql startup hangs when it cannot resolve or connect to a
host. Intuitively, I would like to press Ctrl+C and correct the
connection string or investigate. But that doesn't work because Ctrl+C
is already bound to the query cancel handler by that time.

It seems to me that there is no point in setting up the cancel handler
before the database connection is established. Example patch attached.

Attachment Content-Type Size
psql-startup-cancel-handler.patch text/plain 568 bytes


Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2013-05-14 15:39:50 Re: commit fest schedule for 9.4
Previous Message Heikki Linnakangas 2013-05-14 15:34:24 Re: streaming replication, "frozen snapshot backup on it" and missing relfile (postgres 9.2.3 on xfs + LVM)