It's actually "pa, in st., a king," which comes from an old fable in which a boy calls his father to the window because he recognizes the monarch lying out in the street, and the king rewards the boy for his meticulous attention to detail once reinstated
not looking up the etymology is painstaking "pains-taking" or "pain-staking"