[r=jtv][bug=1300363][author=allenap] Take an advisory lock to prevent concurrent creation of the eventloops table.
Creating tables in PostgreSQL is a transactional operation like any other. If the isolation level is not sufficient - the default in Django - it is susceptible to races. Using a higher isolation level may lead to serialisation failures, for example. Advisory locking side-steps this.