timescale / timescaledb-extras

Helper functions and procedures for timescale
Other
44 stars 16 forks source link

Fix locks on bgw_job_stats #24

Closed fabriziomello closed 2 years ago

fabriziomello commented 2 years ago

We're updating the bgw_job_stats table without properly lock the row to prevent concurrent updates from other background workers.

Fixed it by properly lock it using SELECT ... FOR UPDATE and issue a COMMIT after each function call;