Shareplex version 5.x contains a feature that allows post to run in single threaded (STP) or in multi threaded (MTP) mode. This solution provides a procedure to safely switch post from single thread to multi thread and vice versa.
Failure to adhere to this procedure can result in orphan post processes or duplicate post readers.
Intructions
Switching betweenSTP and MTP(and vice-versa) is generally an easy process and one needs to stop the Post, make sure that it is stopped gracefully (cleanly), change its mode and then restart Post. To check whether it stopped gracefully, issue status from sp_ctrl, and see if it returns stopped by user (indicates clean stop) or stopping (indicates that the operations associated with the dying Post are still occurring). The operations that go on behind the scene during stopping state at theOS or database levels are:
1. The Post process is being killed at the OS level.
2. The associated session(s) of Post are being killed at the database level, meaning that whatever uncommitted transactions were being applied by Post prior to issuing stop post are in the process of being rolled back.
These steps take their time, keep issuing status from sp_ctrl to make sure that Post is stopped by user, and wait till that happens. Once it is stopped, change to mode of Post from STP to MTP or vice versa as applicable and then restart Post.
The steps for changing the mode are:
A.To change the mode from MTP to STP (when no named queues are involved or if changing the mode of all the Post queues in one go):
sp_ctrl> stop import
sp_ctrl> stop post
sp_ctrl>status (Make sure that status shows that Post has been stopped by user, which indicates a clean stop and is not in a stopping state. Keep issuing status till that happens)
sp_ctrl> set post single
sp_ctrl> start post
sp_ctrl> start import
Likewise, to change the mode from STP to MTP (when no named queues are involved or if changing the mode of all the Post queues in one go):
sp_ctrl> stop import
sp_ctrl> stop post
sp_ctrl>status (Make sure that status shows that Post has been stopped by user, which indicates a clean stop and is not in a stopping state. Keep issuing status till that happens)
sp_ctrl> set post multi
sp_ctrl> start post
sp_ctrl> start import
B.If named queues are involved and wishing to selectively change the mode of a particular named queue from MTP to STP:
sp_ctrl> stop import
sp_ctrl> stop post queue <queuename>
sp_ctrl> set post single queue <queuename>
sp_ctrl> start post queue <queuename>
sp_ctrl> start import
Likewise, to selectively change the mode of a particular named queue from STP to MTP:
sp_ctrl> stop import
sp_ctrl> stop post queue <queuename>
sp_ctrl> set post multi queue <queuename>
sp_ctrl> start post queue <queuename>
sp_ctrl> start import
NOTE: this solution is applicable only to Shareplex versions 5.x.
© 2025 Quest Software Inc. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center