Re: psql is hanging - Mailing list pgsql-general

From Geoff Winkless
Subject Re: psql is hanging
Date
Msg-id CAEzk6fdrrxNwDXKoTA4xgDBkadcpbephhjDg8-7sC-VWeuFX-w@mail.gmail.com
Whole thread Raw
In response to psql is hanging  (John Smith <localdevjs@gmail.com>)
List pgsql-general
On Fri, 30 Nov 2018 at 15:53, John Smith <localdevjs@gmail.com> wrote:
> We have a long script of sql that we run, several thousand lines of sql. If I execute the script
> from start to finish, somewhere in the middle of it, one sql command will hang and take 2 to
> 3 hours. During this time, "htop" shows 100% cpu usage with a postgresql process, so it
> appears to be doing something.
>
> If I stop that command, then immediately rerun the rest of the script starting from the command that "hung",
> the "hung" command then completes in 5 seconds and the rest of the script just continues on perfectly.

I assume that JDBC doesn't put a transaction around your whole script
if you send it in one hit?

Geoff


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: psql is hanging
Next
From: Ron
Date:
Subject: Re: psql is hanging