Fix pg initialization problem on unittest