What SKIP LOCKED actually does

A Postgres-native job queue in 30 lines, and why it doesn't block.