Search Postgresql Archives

Re: truncate table getting blocked

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Tue, Apr 26, 2016 at 7:25 PM, Albe Laurenz <laurenz.albe@xxxxxxxxxx> 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_isolation_level(psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT)

Reference - 
http://initd.org/psycopg/docs/faq.html

Thanks,
Jayadevan



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux