Postgres upgrade (from version 13)

Thanks Grove,

On the current system, Postgres 13 is bundled with GitLab 16. Can I upgrade using the GitLab 18 for example and it will setup the bundled Postgres as required and it will do any migration required?