Re: Strategy for unlocking query - Mailing list pgsql-sql

From Tom Lane
Subject Re: Strategy for unlocking query
Date
Msg-id 10900.986400437@sss.pgh.pa.us
Whole thread Raw
In response to Strategy for unlocking query  ("Graham Vickrage" <graham@digitalplanit.com>)
List pgsql-sql
"Graham Vickrage" <graham@digitalplanit.com> writes:
> I have just done a rather large transaction via a telnet/psql session which
> executed OK. The problem occured when the telnet session timed out before I
> could commit the rows.

> This must have locked the rows in question because when I tried to vacuum
> the table it just hung.

Probably the backend process was still there and didn't yet realize that
the client connection had died.  It would notice eventually, but I think
the timeout involved is typically an hour or so (this is determined by
the TCP protocols and isn't under our control).

> What is the best way of dealing with this problem as I ended up stopping and
> restarting the postmaster?

It would've been sufficient to find and SIGTERM the individual backend
from the lost session.
        regards, tom lane


pgsql-sql by date:

Previous
From: "Albert REINER"
Date:
Subject: Historical dates in Timestamp
Next
From: Tom Lane
Date:
Subject: Re: Historical dates in Timestamp