First stab at an eventstore in postgres