This avoids the upstream behavior of resetting our carefully crafted "arbitrary user" permissions during the installation of `postgresql-common` -- alternatively, we could set the permissions after the install, but explicitly overriding the package behavior is cleaner.
Also, move up the creation of `/run/postgresql` and finally apply the `/var/run` -> `/run` conversion that both Debian and Alpine applied long ago (no longer relying on the compatibility symlink).
POSTGRES_PASSWORD (and related vars) are only needed during initdb and
the temporary-server initialisation phase. After that they serve no
purpose, but remain in the process environment for the entire lifetime
of the container, where any loaded C extension can read them via
environ.
Unsetting them immediately before the final exec ensures the running
PostgreSQL server process starts with a clean environment.