Fixed the backward compatibility issue for pid in pg_stat_activity in the activity terminator.