How do you guys handle record locking when it comes to ProIV and a database?
We're currently running in ProIsam but are working towards moving to Postgres.
With ProIsam, if I have a paging screen with a file in add/change/delete mode and lock a record, a second session will not be able to edit that record (obviously) until the first session is finished with it. What I am noticing in our Postgres environment is, in the same scenario, the record stays locked until the first session exits the paging cycle, which isn't ideal for us. In the Postgres environment I've added the commit() statement in after write of the file and now it behaves the same as the ProIsam environment, which is what we want. The ProIV documentation, however, states "It is recommended practice to structure application functions around the automatic commits and to use the COMMIT() statement only when necessary". What do you guys do?
This is a very simple example. We have other functions that call many other functions which call many other functions, etc. many levels deep. What do you guys do in those scenarios? Ideally we would like to avoid restructuring our functions as much possible. That may result in orphan records being produced but that would be no different than what we have now. Not ideal but it is reality at the moment.