Re: pgsql server reset the connection immediately after connected - Mailing list pgsql-general

From Adrian Klaver
Subject Re: pgsql server reset the connection immediately after connected
Date
Msg-id 50933B52.8090001@gmail.com
Whole thread Raw
In response to Re: pgsql server reset the connection immediately after connected  (Dongkuo Ma <luc.mdk@gmail.com>)
Responses Re: pgsql server reset the connection immediately after connected  (Dongkuo Ma <luc.mdk@gmail.com>)
List pgsql-general
On 11/01/2012 07:57 PM, Dongkuo Ma wrote:
> Hi
> the python code is
>
> logging.info <http://logging.info>("database connecting...")
> conn = connect(database="dbname", user="user",
> password="password",host="127.0.0.1")
> logging.info <http://logging.info>("database connected")
> conn.autocommit = True
> conn.set_client_encoding('UTF8')
> cur = conn.cursor()
> #the above code executed without exception
> #and [server closed the connection unexpectedly] thrown when any
> cur.execute() called
> I think it's strange because the server reset connection after
> connected,and the connect function should throw a exception.

You sure you are not doing anything contrary to the instructions here:

http://initd.org/psycopg/docs/usage.html#thread-safety

>
> It's nothing in the log file.
>
> Thanks.
>
--
Adrian Klaver
adrian.klaver@gmail.com


pgsql-general by date:

Previous
From: Dongkuo Ma
Date:
Subject: Re: pgsql server reset the connection immediately after connected
Next
From: Chris Angelico
Date:
Subject: Re: pgsql server reset the connection immediately after connected