Re: Connection breaks with in transaction with a commit
| От | Craig Ringer |
|---|---|
| Тема | Re: Connection breaks with in transaction with a commit |
| Дата | |
| Msg-id | 47FBB7D5.9050600@postnewspapers.com.au обсуждение исходный текст |
| Ответ на | Connection breaks with in transaction with a commit (Pushker Chaubey <pchaubey@vertex.co.in>) |
| Список | pgsql-jdbc |
Pushker Chaubey wrote: > Hi, > > I am new to postgres and jdbc. > I am facing a very strange problem. I initiate a transaction with > con.setAutocommitOn(false). My transaction contains two prepare > statements (first one is select, second one is update query) and then a > batch query of prepared insert statements. It executes first two > statements successfully and then while preparing the next > prepareStatement, the connection breaks and commits the data updated so > far in the transaction. If the connection is really breaking, shouldn't that result in an automatic ROLLBACK on the server side? Try enabling log_statement and log_connection in the PostgreSQL server logs, running your tests, and examining the server logs. Your database access tools might be doing a commit behind your back. -- Craig Ringer
В списке pgsql-jdbc по дате отправления: