Revert "Materialize valid_primaries view (14.5)"
See gitlab-com/gl-infra/production#5945 (closed) for context. Basically we still use Postgresql 11 which does not support materilize
yet.
I've already made an MR on gitlab to revert Gitaly. However since the release-bot auto bumps Gitaly dependency to the latest version, I thought I will need to revert the change here too.