How should the DBLOCKS environment variable be set?

From BRTT

Jump to: navigation, search


Question
Question:

How should the DBLOCKS environment variable be set?

Answer:

Datascope allows a limited form of multiuser write access with database table locks. These locks are activated either by the environment variable DBLOCKS, or by specifying the dblocks parameter in the database descriptor file. The latter is usually much more convenient.


The dblocks parameter or the DBLOCKS environment variable may be set to some value like "yes" or "on", or the specific value "nfs", or left unset.

When unset, no table locking is done and separate programs adding to the same table are likely to collide, particularly in the generation of new ids like orid and arid.

When set to "yes", separate programs on the same machine coordinate adding to a table on a locally mounted filesystem. While the programs may occasionally need to wait for each other, they will not corrupt the table or end up with duplicate ids.

When set to "nfs", separate programs on different machines coordinate adding to a table shared via nfs. Specifying nfs requires specifying and running a dbids id server. The dbids server should probably be set up to run under rtexec; the machine and port for this server are specified by the dbidserver parameter in the database descriptor file, or the DBIDSERVER environment variable. See dbdescriptor(5) [1] and dbids(1) [2] for more information.