I have a PostgreSQL function A. Many clients will call A:
- client X1 send query 1 "SELECT A();" then
- client X2 send query 2 "SELECT A();" then
- client X3 send query 3 "SELECT A();" then
...
How to force function A to run sequentially?
Mean that force: query 1 run --> finish or timeout --> query 2 run --> finish or timeout --> query run --> finish or timeout ... (not allow query 1 and query 2 run simultaneously)