Re: [GENERAL] truncate table getting blocked

2016-04-26 Thread Mike Sofen
From: Jayadevan M Sent: Tuesday, April 26, 2016 6:32 AM Hello, I have a python script. It opens a cursor… Thanks, Jayadevan

Re: [GENERAL] truncate table getting blocked

2016-04-26 Thread Jayadevan M
On Tue, Apr 26, 2016 at 7:25 PM, Albe Laurenz wrote: > > > It is not the "SET search_path" statement that is blocking the truncate, > but probably some earlier statement issued in the same transaction. > You are right. I had a select against that table. Adding this line fixed it ... conn.set_is

Re: [GENERAL] truncate table getting blocked

2016-04-26 Thread Albe Laurenz
Jayadevan M wrote: > I have a python script. It opens a cursor, and sets the search_path (using > psycopg2). In case > something goes wrong in the script , a record is inserted into a table. In > that script, I am not doing > any thing else other than reading a file and publishing the lines to a

[GENERAL] truncate table getting blocked

2016-04-26 Thread Jayadevan M
Hello, I have a python script. It opens a cursor, and sets the search_path (using psycopg2). In case something goes wrong in the script , a record is inserted into a table. In that script, I am not doing any thing else other than reading a file and publishing the lines to a queue (no database oper