Thread: Cursor copy_from with server crash

Cursor copy_from with server crash

From
Grant McKenzie
Date:
Hi

Using copy_from to insert a bunch of data. While this is running, the server host crashes and restarts. Getting a
stacktracefrom our client process, the copy_from never returned ( presumably no tcp close was received ) 

Are there any common designs for protecting from host crashes, particularly when using copy_from?

Psycopg2 version 2.0.8

Regards
Grant


Re: Cursor copy_from with server crash

From
Marko Kreen
Date:
On Thu, Sep 29, 2011 at 5:36 PM, Grant McKenzie <mckenzig@optonline.net> wrote:
> Using copy_from to insert a bunch of data. While this is running, the server host crashes and restarts. Getting a
stacktracefrom our client process, the copy_from never returned ( presumably no tcp close was received ) 
>
> Are there any common designs for protecting from host crashes, particularly when using copy_from?

TCP keepalive, see libpq params in 9.0+

--
marko