Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> The exclusive lock is only needed during the final swap phase, and its duration can be configured.

FYI: even a very short operation that requires an exclusive lock can induce significant downtime if there’s anything else that holds a shared lock for extended periods. In [1], there was:

- a wraparound autovacuum (which holds a shared lock for potentially a long time — like hours)

- lots of data path operations wanting a shared lock

- one operation that should have been very brief that merely tried to take an exclusive lock

The result is that the presence of an operation wanting an exclusive lock blocked the data path for the duration of the autovacuum. Major outage.

[1] https://web.archive.org/web/20190320162510/https://www.joyen...

Edit: this was a while ago with v9.2, but I don’t know if any of this behavior has changed.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: