
The pitfall of using PostgreSQL advisory locks with Go's DB connection pool - gsempe
https://engineering.qubecinema.com/2019/08/26/unlocking-advisory-locks.html
======
zeroimpl
Seems like if you tried to use transactions, you'd have the same problem?

~~~
karmakaze
A transaction executes all commands using the same connection so it would have
worked. The semantics are different though where the commands issued between
the lock and unlock aren't atomic if issued on the same connection but not in
a tx.

------
erik_seaberg
TL;DR: PostgreSQL requires reserving a single connection for causally-related
statements. Seems like a scaling problem for the C10K world, not just Go.

~~~
jabwork
I ran into this same issue with python/SQLAlchemy. It's a connection pool
thing

