I'm working on a application which should get data from a one table and record a result of processing in another table. All this in more that one thread and on a few computers. So I need to use some synchronize mechanism for that. As far as I need to use more that one computers I have to use some sync mechanism in DB (in my case it's PostgresSQL) instead of use lock in code. I know that postgres provide some lock on table, but i didn't find any docs how to setup it.
Possible some standard solution already exist for that?