pgsql: Rewrite ConditionVariableBroadcast() to avoid live-lock.

2018-01-05 Thread Tom Lane
Rewrite ConditionVariableBroadcast() to avoid live-lock. The original implementation of ConditionVariableBroadcast was, per its self-description, "the dumbest way possible". Thomas Munro found out it was a bit too dumb. An awakened process may immediately re-queue itself, if the specific conditi

pgsql: Rewrite ConditionVariableBroadcast() to avoid live-lock.

2018-01-05 Thread Tom Lane
Rewrite ConditionVariableBroadcast() to avoid live-lock. The original implementation of ConditionVariableBroadcast was, per its self-description, "the dumbest way possible". Thomas Munro found out it was a bit too dumb. An awakened process may immediately re-queue itself, if the specific conditi