Backport of pid table code from trunk & 2.2 to the 2.0 tree. Create dev branch for this before we fold in