PostgreSQL locking 0 to 100