Re: [GENERAL] pgsql server reset the connection immediately after connected

2012-11-01 Thread Chris Angelico
On Fri, Nov 2, 2012 at 2:43 PM, Dongkuo Ma wrote: > I connect to database and then fork a new process! > Now it's ok. > Thanks. Ah, yes, that would be a dangerous thing to do :) ChrisA -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] pgsql server reset the connection immediately after connected

2012-11-01 Thread Dongkuo Ma
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 wrote: > On 11/01/2012 07:57 PM, Dongkuo Ma wrote: > >> Hi >> the python code is >> >> logging.info ("**database connecting...") >> >> conn = connect(databas

Re: [GENERAL] pgsql server reset the connection immediately after connected

2012-11-01 Thread Chris Angelico
On Fri, Nov 2, 2012 at 1:57 PM, Dongkuo Ma wrote: > Hi > the python code is > > logging.info("database connecting...") > conn = connect(database="dbname", user="user", > password="password",host="127.0.0.1") > logging.info("database connected") > conn.autocommit = True > conn.set_client_encoding('

Re: [GENERAL] pgsql server reset the connection immediately after connected

2012-11-01 Thread Adrian Klaver
On 11/01/2012 07:57 PM, Dongkuo Ma wrote: Hi the python code is logging.info ("database connecting...") conn = connect(database="dbname", user="user", password="password",host="127.0.0.1") logging.info ("database connected") conn.autocommit = True conn.s

Re: [GENERAL] pgsql server reset the connection immediately after connected

2012-11-01 Thread Dongkuo Ma
Hi the python code is logging.info("database connecting...") conn = connect(database="dbname", user="user", password="password",host="127.0.0.1") logging.info("database connected") conn.autocommit = True conn.set_client_encoding('UTF8') cur = conn.cursor() #the above code executed without exceptio

Re: [GENERAL] pgsql server reset the connection immediately after connected

2012-11-01 Thread Adrian Klaver
On 11/01/2012 07:32 PM, Dongkuo Ma wrote: Sorry! I typed the enter key and sent the uncomplete message. The psycopg2 connect function succesed,but throw a exception server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the req

Re: [GENERAL] pgsql server reset the connection immediately after connected

2012-11-01 Thread Adrian Klaver
On 11/01/2012 07:24 PM, Dongkuo Ma wrote: Hi Sorry for my English. I'm running pgsql8.4 server on debian,the client is the python library(psycopg2) on the same mechine. The client connect server via 127.0.0.1:5432 . The psycopg2 connect function /succesed,but throw a excep

Re: [GENERAL] pgsql server reset the connection immediately after connected

2012-11-01 Thread Dongkuo Ma
Sorry! I typed the enter key and sent the uncomplete message. The psycopg2 connect function succesed,but throw a exception server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. when executing any sql statement. Us