I'm working with AWS RDS PG instances that have been created over time, and that by now are a mix of several major/minor versions ranging from 12 to 15.
The initial configuration and management is done from an EC2 instance running Debian 11, which has Postrgres 13.13.
I already found out that there are compatibility issues if I use the client programs from the Debian VM when they're older than the server version.
Like what?
For starters:
pg_restore: error: unsupported version (1.15) in file header
Upgrade Postgresql on the Debian 11 EC2 instance from 13.11 to 15.latest.
Or install Postgresql 12, 14 and 15 alongside Pg 13. They all go in separate directories.