This sample demonstrates the use of shared memory in a cluster environment. (Note that several processes can be run on the same node.)
In a console window run:
cluster_shared 2 0The first process for node 0 creates the cluster database in shared memory. Then, in a second console window, run:
cluster_shared 2 0The second process for node 0 connects to the database created by the first process. Then, in a third console window, run:
cluster_shared 2 1Note that only the first process (which creates the database) will print out the database content.
But it is more instructive to run one instance in your development environment debugger, stepping through the code.