Re: PrepareStatement.execute() blocked because of long time'create index' operation, connection leak
От | Dave Cramer |
---|---|
Тема | Re: PrepareStatement.execute() blocked because of long time'create index' operation, connection leak |
Дата | |
Msg-id | CADK3HHJL0G=FMMeXG_eqEpmTTdOiXkVQJnpqvST7FiD3sAOECA@mail.gmail.com обсуждение исходный текст |
Ответ на | PrepareStatement.execute() blocked because of long time 'create index' operation, connection leak ("jingzhi.zhang@outlook.com" <jingzhi.zhang@outlook.com>) |
Ответы |
Re: PrepareStatement.execute() blocked because of long time'create index' operation, connection leak
Re: PrepareStatement.execute() blocked because of long time 'create index' operation, connection leak |
Список | pgsql-jdbc |
There is a cancel statement, but I presume you want the create index to succeed. You may have to execute the execute() in a background thread to not block the main thread
On 6 June 2016 at 12:25, jingzhi.zhang@outlook.com <jingzhi.zhang@outlook.com> wrote:
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.
В списке pgsql-jdbc по дате отправления: