PrepareStatement.execute() blocked because of long time 'create index' operation, connection leak

From: "jingzhi(dot)zhang(at)outlook(dot)com" <jingzhi(dot)zhang(at)outlook(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: PrepareStatement.execute() blocked because of long time 'create index' operation, connection leak
Date: 2016-06-06 16:25:07
Message-ID: BLU437-SMTP10F2FDBD2E377E73A45234F95C0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi,

I use jdbc to create index on a table, the sql of 'create index' cost about 30 minutes.
Finally I found, the jdbc client thread blocked at PrepareStatement.execute(), not finished.
At server side, query pg_stat_activity, the connection state already be ‘idle’ (index creation finished).

Is there any suggestion? How to deal with the client thread blocking (read for a response message?) and connection leak.

Thanks a lot.

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2016-06-07 11:21:10 Re: PrepareStatement.execute() blocked because of long time 'create index' operation, connection leak
Previous Message Dave Cramer 2016-06-05 21:18:08 Re: Re: Batches of single-insert statements vs batches of multi-insert statements