killing pg_dump leaves backend process

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: killing pg_dump leaves backend process
Date: 2013-08-10 02:39:01
Message-ID: 20130810.113901.1014453099921841746.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I noticed pg_dump does not exit gracefully when killed.

start pg_dump
kill pg_dump by ctrl-c
ps x

27246 ? Ds 96:02 postgres: t-ishii dbt3 [local] COPY
29920 ? S 0:00 sshd: ishii(at)pts/5
29921 pts/5 Ss 0:00 -bash
30172 ? Ss 0:00 postgres: t-ishii dbt3 [local] LOCK TABLE waiting

As you can see, after killing pg_dump, a backend process is (LOCK
TABLE waiting) left behind. I think this could be easily fixed by
adding signal handler to pg_dump so that it catches the signal and
issues a query cancel request.

Thoughts?
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-08-10 03:17:07 Re: mvcc catalo gsnapshots and TopTransactionContext
Previous Message Craig Ringer 2013-08-10 01:17:43 Re: confusing error message