Why am I getting a warning about "no transaction in progress" after a COMMIT even when I have explicitly started a transaction with START TRANSACTION (works the same as BEGIN)? This will occur 90% of the time for this specific transaction, but other times the commit will succeed. I'm using postgres 9.3. Here's the postgres log:
2014-07-04 21:47:19 EST LOG: statement: START TRANSACTION;
2014-07-04 21:47:19 EST LOG: statement: SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
2014-07-04 21:47:19 EST LOG: statement: SET autocommit = 1;
2014-07-04 21:47:19 EST LOG: statement: SET TIME ZONE 'UTC'
2014-07-04 21:47:19 EST LOG: statement: INSERT INTO "Users" (...) VALUES (...) RETURNING *;
2014-07-04 21:47:19 EST LOG: statement: INSERT INTO "Profiles" (...) RETURNING *;
2014-07-04 21:47:19 EST LOG: statement: SET TIME ZONE 'UTC'
2014-07-04 21:47:19 EST LOG: statement: INSERT INTO "Sessions" (...) VALUES (...) RETURNING *;
2014-07-04 21:47:20 EST LOG: statement: COMMIT;
2014-07-04 21:47:20 EST WARNING: there is no transaction in progress
%ptolog_line_prefixand retry. Also, what client library, client app?START TRANSACTION-COMMITpair that fails, and they are the same for the times when it works. Could that be the problem? Do the sessions need to be the same? Sorry if that's a dumb question; I don't know how transactions work behind-the-scenes. I'm using a beta version 2.0.0 sequelizejs ORM with node, which could be the problem, but I have been using it for some time without any issues and then this started happening randomly.