For the purposes of this post, Ubuntu is used interchangeably with Debian.
PostgreSQL has a ton of dependencies. Building PostgreSQL means installing the headers for a lot of things. Alternatively, you can build those things too by yourself, but then down the rabbit hole you go. You can find a list of those things using apt-get depends postgresql-9.5
libgssapi-krb5-2
libldap-2.4-2
libpam0g
libssl1.0.0
libxml2
tzdata
ssl-cert
locales
Moreover, if you build PostgreSQL, then you'll have to build all of these things yourself independently if you ever need them.. (list generated with apt-cache rdepends postgresql-9.5
postgresql-9.5-dbg
postgresql-pltcl-9.5
postgresql-plpython3-9.5
postgresql-plpython-9.5
postgresql-plperl-9.5
postgresql-contrib-9.5
postgresql-9.5-dbg
postgresql-pltcl-9.5
postgresql-plpython3-9.5
postgresql-plpython-9.5
postgresql-plperl-9.5
postgresql-comparator
postgresql-9.5-slony1-2
postgresql-9.5-repmgr
postgresql-9.5-repack
postgresql-9.5-python3-multicorn
postgresql-9.5-python-multicorn
postgresql-9.5-prioritize
postgresql-9.5-preprepare
postgresql-9.5-prefix
postgresql-9.5-powa
postgresql-9.5-postgis-2.2
postgresql-9.5-plv8
postgresql-9.5-plsh
postgresql-9.5-plr
postgresql-9.5-plproxy
postgresql-9.5-pllua
postgresql-9.5-pgtap
postgresql-9.5-pgrouting
postgresql-9.5-pgq3
postgresql-9.5-pgpool2
postgresql-9.5-pgmp
postgresql-9.5-pgmemcache
postgresql-9.5-pgfincore
postgresql-9.5-pgextwlist
postgresql-9.5-partman
postgresql-9.5-orafce
postgresql-9.5-mysql-fdw
postgresql-9.5-mimeo
postgresql-9.5-ip4r
postgresql-9.5-debversion
postgresql-9.5-citus
postgresql-9.5-asn1oid
pg-rage-terminator-9.5
glom-utils
glom
On top of all that, your distribution will provide
- upgrades to newer versions of PostgreSQL when new releases come out. And, not just access to those upgrades, but they'll show up with one-click upgrade, and through whatever notification systems you in the desktop environment or at the command line. Ubuntu provides them in motd-messages and taskbar-applications.
- and, security patches for the version that they've frozen. In some cases the distribution may even back-port the security patches when the database drops support.
As to configuration, both versions will be configured slightly differently. As it relates to Ubuntu,
- Ubuntu installs by default to a path that includes the source-distribution's version.
- Ubuntu comes with different stock utilities that help you manage this
For a list of the management utilities provided by Ubuntu/Debian and their differences see this question,