When running the below statement that takes more than 30 minutes (31 minutes) using psycopg2 the execution ends in the PostgreSQL server but the python routine not ends:
do $$
declare
v_minutes int := 31;
begin
perform pg_sleep(60 * v_minutes);
end $$;
print("start of execution")
try:
cur = conn.cursor()
cur.execute(statement)
finally:
if cur:
cur.close()
print("end of execution")
In the PostgreSQL logs I got at 30 minutes of execution: "could not receive data from client: connection reset by peer"
If I run the statement with 29 minutes for example... it works ok.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745614334a4636139.html
评论列表(0条)