[46594597] replace mongodb with postgresql[3]

more code refine.

Signed-off-by: Henry Chen <hchen@vmware.com>