Files
2012-02-21 01:15:00 -05:00

1 line
3.2 KiB
JSON

[{"user_id": 3965, "stars": [], "topic_id": 14051, "date_created": 1300613804.8360741, "message": "Has anyone run into issues with applying South migrations to a Postgres database resulting in deadlocks when trying apply constraints (usually around foreign keys)?", "group_id": 81, "id": 391595}, {"user_id": 21387, "stars": [], "topic_id": 14051, "date_created": 1300682940.5238211, "message": "i've faced deadlocks countless times with postgresql and south, but i don't use south anymore.", "group_id": 81, "id": 395374}, {"user_id": 281, "stars": [], "topic_id": 14051, "date_created": 1300703846.2589281, "message": "usually if there is deadlocks coming up, you either need to break the migration down into several smaller migrations so the commands get run in separate transactions", "group_id": 81, "id": 397087}, {"user_id": 281, "stars": [], "topic_id": 14051, "date_created": 1300703871.161314, "message": "or you need to find and prevent what ever application transaction is interacting with your migration to create the deadlock", "group_id": 81, "id": 397088}, {"user_id": 21387, "stars": [], "topic_id": 14051, "date_created": 1300710437.1896291, "message": "the thing is that nothing should be interacting with the migration but its own transaction themselves. it's just unexplainable (until someone look deeply enough)", "group_id": 81, "id": 397345}, {"user_id": 17654, "stars": [], "topic_id": 14051, "date_created": 1300711895.585032, "message": "Had the same issue. Here's what I did to \"solved\" the issue. I dumped the data,recreated the schema from scratch and loaded the data back. After that I was able to run my migrations and I haven't encountered any problems since then.", "group_id": 81, "id": 397426}, {"user_id": 20967, "stars": [], "topic_id": 14051, "date_created": 1300717148.8424971, "message": "@juliengrenier unfortunately that is not an option with the service we provide.", "group_id": 81, "id": 398331}, {"user_id": 8740, "stars": [], "topic_id": 14051, "date_created": 1300721514.4741199, "message": "Usually, a quick restart of the database server followed by running the migration will work, as there's not enough time to set up deadlock conditions with other things.", "group_id": 81, "id": 399066}, {"user_id": 8740, "stars": [], "topic_id": 14051, "date_created": 1300721484.0433121, "message": "Deadlocks are an unfortunate side-effect of some operations. There's nothing to stop them happening but making sure your migrations and normal queries don't collide", "group_id": 81, "id": 399059}, {"user_id": 229, "stars": [{"date_created": 1300727959.0730541, "user_id": 1243}], "topic_id": 14051, "date_created": 1300724838.603615, "message": "The postgres server log should explain the two queries that deadlocked, which might be enough to diagnose it.", "group_id": 81, "id": 399667}, {"user_id": 1883, "stars": [], "topic_id": 14051, "date_created": 1300909885.318326, "message": "FWIW, these seem related: https://www.fossexperts.com/content/foreign-key-locks", "group_id": 81, "id": 420152}, {"user_id": 1883, "stars": [], "topic_id": 14051, "date_created": 1300909886.5646939, "message": "http://www.mail-archive.com/pgsql-hackers@postgresql.org/msg157869/deadlock.sql", "group_id": 81, "id": 420153}]