something like this:
mkdir -p /var/opt/gitlab/postgresql/data.11
docker run --rm \
-v /var/opt/gitlab/postgresql/data:/var/lib/postgresql/9.6/data \
-v /var/opt/gitlab/postgresql/data.11:/var/lib/postgresql/11/data \
tianon/postgres-upgrade9.6-to-11
mv /var/opt/gitlab/postgresql/data /var/opt/gitlab/postgresql/data.9.6
mv /var/opt/gitlab/postgresql/data.11 /var/opt/gitlab/postgresql/data
chown -R git /var/opt/gitlab/postgresql
optionally check if you need to fix permissions