Try to detect the version of postgresql installed.
Instead of assuming it will be 12, see if pg_config is available to tell us the installed version (needed for ubuntu 22.04 support)
Instead of assuming it will be 12, see if pg_config is available to tell us the installed version (needed for ubuntu 22.04 support)