Re: multiple threads inserting into the same table
От | Scott Marlowe |
---|---|
Тема | Re: multiple threads inserting into the same table |
Дата | |
Msg-id | dcc563d10903231338y38879310j438eb07b64593c42@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: multiple threads inserting into the same table (Brian Cox <brian.cox@ca.com>) |
Ответы |
Re: multiple threads inserting into the same table
|
Список | pgsql-performance |
On Mon, Mar 23, 2009 at 2:25 PM, Brian Cox <brian.cox@ca.com> wrote: > Tom Lane [tgl@sss.pgh.pa.us] wrote: >> >> pg_stat_activity says those five threads are doing nothing except >> sitting around with open transactions. You sure you don't have a bug on >> the application side? >> >> regards, tom lane > > This is a java app. A thread dump reveals that these 5 threads are all > asleep on a socket read to postgres (see below). DbUtils.java:2265 is: > > session.connection().createStatement() .executeUpdate(((DatabaseInsert) > insertObject).getInsertStmt(session)); > > This generates and executes a single SQL insert. Since, as you point out, > postgres seems to think that this transaction isn't doing anything, > it's hard to figure out what the read is doing. Might you have a firewall that's killing the connections? What does netstat -an on the client side say about these connections?
В списке pgsql-performance по дате отправления: