Convert postgres worker state to map
Convert query validator state to map