sam server - prepare to support PostgreSQL database