On Wed, May 5, 2010 at 5:54 AM, Xanthus <[email protected]> wrote:
> Hi all. I will try do my best to explain my setup and the sequence of
> actions triggering the issue:
>
> 1. Machine starts and all is fine.
> 2. We do the following operations (through and automated script):
> a. stop Apache
> b. stop Postgresql
> c. drop database
> d. create database again
> e. restore database from a versioned backup
> f. remove the application *.pyc files
> g. start Postgresql
> h. start Apache
> 3. We log in again and we see that the foreign key fields in all the
> forms who have them are empty. In the admin change forms the foreign
> keys fields are filled correctly. If we restart Apache a few times
> (random) the problem fixes itself.
>
> Setup: django 1.2beta1, PostgresSQL 8.4, Apache 2.2.12, application
> served by mod_wsgi, operating system Ubuntu Linux 9.10 server edition,
> Python 2.6.4
>
> Notes: all the models are using a custom model manager (1) who uses
> threadlocals to get the current authenticated user and do extra
> filtering. If we remove the use the extra filtering using threadlocals
> the problem doesn't happen.
>
> (1) http://dpaste.com/hold/191037/
>
> Any hints or pointers to debug the problem? Thanks in advance.
>

How are you managing to drop, recreate, and re-import a database
whilst postgresql is stopped?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to