Add Postgres database configuration and fix weird script error