Avoid error if no postgression database available.

#1872