From: | Dongkuo Ma <luc(dot)mdk(at)gmail(dot)com> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: pgsql server reset the connection immediately after connected |
Date: | 2012-11-02 03:43:11 |
Message-ID: | CAMccLycMFa4dZZCDbAo8E_S+TPppE3=f4=QiMB=23HAgOsBcgA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I connect to database and then fork a new process!
Now it's ok.
Thanks.
On Fri, Nov 2, 2012 at 11:17 AM, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>wrote:
> 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<http://initd.org/psycopg/docs/usage.html#thread-safety>
>
>
>
>> It's nothing in the log file.
>>
>> Thanks.
>>
>> --
> Adrian Klaver
> adrian(dot)klaver(at)gmail(dot)com
>
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Janes | 2012-11-02 03:45:13 | Re: Postgresql ShareLock problems. |
Previous Message | Chris Angelico | 2012-11-02 03:25:18 | Re: pgsql server reset the connection immediately after connected |