Hi, Andreas, Andreas Ntaflos wrote:
> I am quite new to multithreaded programming and still have to get used > to some concepts but as far as I understand the ACID principle no > concurrency issues should arise when reading from and writing to a > database like Postgres from multiple threads, and no mutexes are > required for such (but only such) operations either. The ACID principle only works between different transactions, not between statements in the same transaction. So, if you use one connection per thread, you hava ACID between the threads. If you use the same connection, and have autocommit on, then every statement is a single transaction, so you have ACIT between statements. But when you use the same connection, and don't have autocommit, all statements are in the same transaction (except when you commit/abort explicitly), and you don't have ACID. Btw, you should also see wether your transaction isolation level is set to what you expect. HTH, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in Europe! www.ffii.org www.nosoftwarepatents.org _______________________________________________ Libpqxx-general mailing list [email protected] http://gborg.postgresql.org/mailman/listinfo/libpqxx-general
