[postmodern-devel] syncing the socket
Hi, My bulk copier is somewhat working now but the next time I try to issue a query on the same connection (using cl-postgres:exec-query), I'm getting "Unexpected message received: Z". I thought that putting a "try-to-sync" after sending my CopyDone message should prevent this but apparently it doesn't. Any ideas what's going on? -- Andy Chambers
My bulk copier is somewhat working now but the next time I try to issue a query on the same connection (using cl-postgres:exec-query), I'm getting "Unexpected message received: Z". I thought that putting a "try-to-sync" after sending my CopyDone message should prevent this but apparently it doesn't.
I think your copy message handler should explicitly wait for the ReadyForQuery message if the protocol specifies that it arrives after a copy. wait-for-sync is too crude, it is used to recover from errors, shouldn't be used in regular operation.
participants (2)
-
Andy Chambers
-
Marijn Haverbeke