Run the postgresql database in a container on your raspberrypi. This image is based on the official docker postgres image but builds onto the hypriot alpine v3.4 image for lower storage needs.
In particular the docker-entrypoint.sh file used to setup a started container is taken from the official image after which it was adapted to the alpine linux environment. Hence, for usage information look there.
The only (intentional) difference is that you can set the environment variable UPDATE_ON_START to upgrade alpine linux packages when a container is started.