Use "SKIP LOCKED" instead of advisory lock when pulling out of queue
According to [1], it is better to use the non-standard "SKIP LOCKED" than advisory lock. They are both none standard so it is not really a problem to use this option.
And if we fallback to standard "FOR", it still works but slower as all the table will be locked by the first process until commit.
[1] https://www.2ndquadrant.com/en/blog/what-is-select-skip-locked-for-in-postgresql-9-5/