Forum OpenACS Q&A: Recommended version of PostgreSQL?
If you upgrade from ancient versions of OpenACS, you might have to use some versions in-between, since newer versions of PostgreSQL have dropped some long deprecated functions, which might be used in old upgrade scripts.
OpenACS 5.10.0 requires at least PostgreSQL 9.6 (https://openacs.org/xowiki/openacs-todo), but was tested for it release with PostgreSQL 13 (the newest version of PostgreSQL available at the time of the release), but works as well with all newer versions.
openacs.org runs currently with PostgreSQL 13.
One should then dump the resulting 5.8 database, restore on a later Postgres version (any supported version, such as the one from your distro package manager should be fine) and proceed with the upgrade to 5.10.*
I just had experience about such an upgrade from an old OpenACS 5.4.* to 5.10.*, which was successfull (save the expected fallouts and adjustments).