How to write my own global lock / unlock functions for PostgreSQL
- by rafalmag
I have postgresql (in perlu) function getTravelTime(integer, timestamp), which tries to select data for specified ID and timestamp. If there are no data or if data is old, it downloads them from external server (downloading time ~300ms).
Multiple process use this database and this function. There is an error when two process do not find data and…