Upgrade Postgres - how to proceed?

I recently upgraded from Leap 42.3 to 15.0. This automatically installed Postgres 10, left the existing 9.6 installation intact, and used something like update-alternatives to bend psql and the other executables to their 10.x versions. However, when connecting with a postgres DB, it would show that the postgres version was 9.6, and indeed: The systemd unit calls /usr/share/postgresql/postgresql-script, which trys to determine the correct postgres version, and for this checks the file $DATADIR/PG_VERSION (*$DATADIR is /var/lib/pgsql/data *on Leap), which right now contains 9.6; so the data directory itself wasn’t upgraded.

My question is: What should I do now? My guess is that I should follow the upstream upgrade procedure:

$ systemctl stop postgres
$ su postgres
$ pg_dumpall > some_file
$ mv /var/lib/pgsql/data /var/lib/pgsql/data.old
$ initdb -D /var/lib/pgsql/data

and then move the old config files over and import the dump. Is that correct? And is that what should happen after each postgres upgrade? Note that the upgrade procedure advocates moving /var/lib/pgsql in step 4, but I’m not sure that’s possible on Leap because that path is a btrfs subvolume, or something like that?

Any hint would really be appreciated.