pgsql: Allow ConditionVariable[PrepareTo]Sleep to auto-switch between C

2018-01-09 Thread Tom Lane
Allow ConditionVariable[PrepareTo]Sleep to auto-switch between CVs. The original coding here insisted that callers manually cancel any prepared sleep for one condition variable before starting a sleep on another one. While that's not a huge burden today, it seems like a gotcha that will bite us in

pgsql: Allow ConditionVariable[PrepareTo]Sleep to auto-switch between C

2018-01-09 Thread Tom Lane
Allow ConditionVariable[PrepareTo]Sleep to auto-switch between CVs. The original coding here insisted that callers manually cancel any prepared sleep for one condition variable before starting a sleep on another one. While that's not a huge burden today, it seems like a gotcha that will bite us in