The function first attempts to obtain a local write lock on each vproc. If any one of the vprocs cannot get the lock, the function returns a value of -2 and releases all locks. The call can be tried again if desired. After the lock is obtained on all vprocs, the desired range of memory from the caller is sent to all vprocs. The lock is not released until all copies are updated. A successful call returns 0 for the result. Here are some additional considerations:
- This is an expensive operation. Avoid frequent calls to this function.
- Make sure that the appropriate external routine performs the global updates and that they do not step over each other.
- The best practice is to use some type of versioning information in the GLOP data to make sure that the external routine is using the correct version. This must be coordinated with the external routine.
- Global copy is not designed to redistribute a lot of data. Do not try to use it to duplicate rows. Instead, use SQL statements to do that. Using it in this manner compromises system performance.
- The global copy changes the designated range for all data on all vprocs (all nodes) for the given GLOP data in the given set.
- The global copy only makes changes to all existing GLOP data on all vprocs associated with the type and context. If additional contexts are established subsequent to this call, they will have the initial GLOP context. There is no attempt to keep any future GLOP data in sync with the changes made by the global copy command. If the GLOP data is transaction based, then it only updates those GLOP mappings that are associated with the transaction. If the data is user based, then it updates all GLOP mappings associated with the user that are currently mapped at the time this command is executed.