views:

462

answers:

1

I've added new models and pushed to our staging server, run syncdb to create their tables, and it locks up. It gets as far as 'Create table photos_photousertag' and postgres output shows the notice for creation of 'photos_photousertag_id_seq', but otherwise i get nothing on either said. I can't ctrl+c the syncdb process and I have no indication of what route to take from here. Has anyone else ran into this?

+1  A: 

We use postgres, and while we've not run into this particular issue, there are some steps you may find helpful in debugging:

a. What version of postgres and psycopg2 are you using? For that matter, what version of django?

b. Try running the syncdb command with the "--verbosity=2" option to show all output.

c. Find the SQL that django is generating by running the "manage.py sql " command. Run the CREATE TABLE statements for your new models in the postgres shell and see what develops.

d. Turn the error logging, statement logging, and server status logging on postgres way up to see if you can catch any particular messages.

In the past, we've usually found that either option b or option c points out the problem.

Jarret Hardie