Re: Copy_from gets stuck with bigger input file
Federico Di Gregorio <fog-NGVKUo/i/[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Organization | initd.org |
| Message-ID | <[email protected]> |
Il giorno mer, 13/02/2008 alle 08.59 -0500, Phil Frost ha scritto: > I encountered this problem some time ago. I don't think I found a > solution. See: > http://lists.initd.org/pipermail/psycopg/2007-June/005552.html > http://lists.initd.org/pipermail/psycopg/2007-June/005553.html Thank to paftek that sent me a good crash script I was able to diagnose this problem. First of all it happens only on TCP connections, not on sockets. It works as follows: 1) After some PQputCopyData() that work one just fails with -1 (server error) so we're qreuired to end the copy and read the error from the server. 2) The call to PQputCopyEnd(curs->conn->pgconn, "..."); fails with a return value of -1 (error again!) 3) When we try to get the error to raise an exception, tah-da! the current thread is locked in poll() (on my box) waiting for something. I don't know if I am using libpq the wrong way or it is a libpq bug. I'll do some more tests and let you know. federico -- Federico Di Gregorio http://people.initd.org/fog Debian GNU/Linux Developer [email protected] INIT.D Developer fog-NGVKUo/i/[email protected] In science one tries to tell people, in such a way as to be understood by everyone, something that no one ever knew before. But in poetry, it's the exact opposite. -- Paul Dirac _______________________________________________ Psycopg mailing list Psycopg-IAPFreCvJWPBWskQ1e/[email protected] http://lists.initd.org/mailman/listinfo/psycopg
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBIPCAVvcCgrgZGjesRAk+BAKCPvYRsDaR6Rt1KXUKGGPU0WAdswACgty8i 6s7nWpt6+HcTzkD5n86j/nE= =CL7T -----END PGP SIGNATURE-----