Guard access to postgresql until a ticket has been refed