It is recommended to start and end on the latest patch. This ensures any upgrade path fixes are applied.
However, these patches are often not required.
If you upgrade the operating system on which PostgreSQL runs, an upgrade of locale data changes in glibc 2.28 and later might corrupt your database indexes. See upgrading operating systems for PostgreSQL guide for options to avoid this issue
With GitLab 17.7, the Linux package upgrades OpenSSL from from v1.1.1w to v3.0.0. Before upgrading, use the OpenSSL 3 guide to identify and assess the compatibility of your external integrations.