database - postgresql won't accept a specific key -


so i'm using postgresql 9.5 store bunch of data in table named ids. data stored :

id1 (unique, not null) | bool1 | bool2 | bool3 | id2 (not unique)

id1 , id2 text variables. when try insert new data database use query :

"insert ids (id1, bool2, id2) values (%s, true, %s) on conflict (id1) update set interaction = true, id2 = %s;"

now when try insert specific id1 : c1316a6a-3bdd-4aeb-a1b6-b3044851880a__19 unique (i double checked that) database hangs. while using python , psycopg2 call query, if try insert key database hand (by connecting database via cli or gui) database still hangs.

however, if create similar database , use exact same command, works fine.

any ideas why hangs , how fix ?

edit :

thank you, a_horse_with_no_name

it indeed waiting transaction. killed pid , worked fine afterwards.

thanks again


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -