PostgreSQL locking decorators and functions for Django.