On Fri, August 10, 2007 17:17, Rilson Nascimento wrote: > My problem with sockets is definitely closed. Now my transactions are > behaving strangely. I managed to open just one db connection per client, > but > now I cannot run multiple transactions per connection (it seems). Errors > indicating that there is already a transaction open start to arise. > Otherwise, if I change the code to create one db connection per > transaction > I start to see those TIME_WAIT (a lot of them!) connections with the > database again. That's a perfect example of a dilemma. > > Any thoughts or comment on this?
As always, a connection can have only one transaction open at a time. So always make sure you destroy a transaction before you open a new one on the same connection! (And if you want your work to stay in the database, of course, you'll want to commit the transaction first :-) Jeroen _______________________________________________ Libpqxx-general mailing list Libpqxx-general@gborg.postgresql.org http://gborg.postgresql.org/mailman/listinfo/libpqxx-general