When you are installing the openvas vulnerability scanner and you see an error like this (could be with other PostgreSQL numbers), then keep reading because this is very easy to fix.

This is because both version are installed, in this case on Kali Linux 2022-2, and both version use the same TCP port for connections. So you need to change the port in the configuration of PostgreSQL
sudo nano /etc/postgresql/15/main/postgresql.conf and change the port to 5432.
sudo nano /etc/postgresql/14/main/postgresql.conf and change the port to 5433 (or any other port which is free).
sudo systemctl restart postgresql
Then start the Openvas service and hopefully it will run without any errors.
Nice, this works exactly as you posted. Thanks and I just bought you a coffee!
worked! Thank