The docker-compose.yml file in contrib (https://github.com/element-hq/synapse/blob/develop/contrib/docker/docker-compose.yml) features a now unsupported version (12) of PostgreSQL as database.
This should be updated to a supported version, e.g., v15.