Copy_from gets stuck with bigger input file
paftek <[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <1225290814.6858.42.camel@paftek-laptop> |
On 6/2/08, Manlio Perillo <[email protected]> wrote: > Federico Di Gregorio ha scritto: > > > Il giorno lun, 02/06/2008 alle 11.36 +0200, Manlio Perillo ha scritto: > >> The reason they don't mark the connection as BAD is explained in the > >> comments of the code. > >> You *may* want to call pqReadData so that you can check if there are > >> some NOTICE messages from the backend. > >> > >> pqReadData will make sure to properly clean up the connection. > > > > And if there is no data it will block forever. :/ > > > > > Since the connection has been closed by the server, this should not happen. > > pqReadData should return the data in the socket buffer, if any > > > > federico > > > > > Manlio Any news about this issue ? I bypassed it in my application by only sending few rows through copy_from() at a time. But today I believe that I encounter the same issue using psycopg2 with Londiste from Skytools 2.1.8. Same symptom : a COPY get stuck, no CPU usage, even on small tables. I tried psycopg2 v2.0.5.1 and v2.0.8 (Debian v4.0 OS up-to-date). I switched back temporarily to psycopg1 v1.1.21 and it works perfectly. I will try to get feedback from Skytools mailing list too. There is a similar case here : http://pgfoundry.org/pipermail/skytools-users/2008-July/000660.html