On Tue, 17 Apr 2018 13:34:47 +0200 Ludovic Gasc <[email protected]> wrote: > Hi Nickolai, > > Thanks for your suggestions, especially for the file system lock: We don't > have often locks, but we must be sure it's locked. > > For 1) and 4) suggestions, in fact we have several systems to sync and also > a PostgreSQL transaction, the request must be treated by the same worker > from beginning to end and the other systems aren't idempotent at all, it's > "old-school" proprietary systems, good luck to change that ;-)
If you already have a PostgreSQL connection, can't you use a PostgreSQL lock? e.g. an "advisory lock" as described in https://www.postgresql.org/docs/9.1/static/explicit-locking.html Regards Antoine.
