Re: An unkillable connection caused replication delay on my replica

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Shawn <shamccoy(at)amazon(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: An unkillable connection caused replication delay on my replica
Date: 2016-06-28 20:05:11
Message-ID: 20160628200511.GA52566@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Shawn wrote:

> strace of long-running query pid 6819 loops like this:
>
> sendto(10, "<query stuff removed>" NULL, 0) = ? ERESTARTSYS (To be
> restarted if SA_RESTART is set)
> --- SIGUSR1 {si_signo=SIGUSR1, si_code=SI_USER, si_pid=8719,
> si_uid=3001} ---
> rt_sigreturn()
>
> Where pid 6819 is a long (running for 2 days) running query. In
> pg_stat_activity, it was still listed as "active". The query had a horrible
> execution plan and it was being executed via a python script. I couldn't
> pg_terminate_backend the connection. I didn't try to "kill -9" it due to
> all the warnings about that and I felt I had something special here. I
> attached the debugger.

Did you happen to grab a stack trace of PID 6819?

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-06-28 20:29:20 Re: seg fault on dsm_create call
Previous Message Shawn 2016-06-28 19:56:43 An unkillable connection caused replication delay on my replica