Can I skip major versions in pg_upgradecluster? I'm upgrading postgresql 9.3 to 9.5 on ubuntu/xenial and I would like to know if it is possible to run pg_upgradecluster to go directly from 9.3 to 9.5 or whether I need to go through 9.4 in between?
You should be able to do that with pg_upgradecluster either way, using -m dump which uses pg_dump and pg_restore or -m upgrade which uses pg_upgrade according to the manpage here. Using -m upgrade should be much faster than the dump and restore method that -m dump uses.