Django syncdb locks on table creation

I added new models and clicked on our intermediate server, ran syncdb to create my tables, and it blocks. It comes to the "Create photos_photousertag table" and the postgres output shows a notification about the creation of the "photos_photousertag_id_seq", but otherwise I can’t say anything about any of them. I cannot ctrl + c the syncdb process, and I have no indication of which route to take from here. Has anyone else come across this?

+3
source share
3 answers

We use postgres, and although we do not encounter this particular problem, there are a few steps that may be helpful in debugging:

. postgres psycopg2 ? django?

. syncdb "--verbosity = 2", .

. SQL, django, "manage.py sql". CREATE TABLE postgres , .

. , postgres, , - .

, b c .

+1

, , , Django. .

, , , .

+1

It is strange here too, but just restarted the PostgreSQL service (or server) . I also tried manually pasting the table creation code into psql, but that didn't solve it (well, however, if that was a lock thing), so I just used restart:

systemctl restart postgresql.service

what's on my Suse box.

Not sure if restarting a service / server can also raise existing table locks?

0
source

Source: https://habr.com/ru/post/1705188/


All Articles