Few short notes:
- Doing manual changes on files like this is always a little bit risky as you might e.g. keep running an old and not updated PosgreSQL database on your system
- Please follow-up on 0008472: Greenbone - Openvas - GVMD - incompatible library "/usr/lib/libgvm-pg-server.so": version mismatch - Kali Linux Bug Tracker as this is AFAICT an issue in the Kali packages (happened during the update of PostgreSQL 14 to 15 as well) and the Greenbone community is not able to give support for such packaging issues
- A Kali user could also ask the Kali package maintainers for documentation on upgrades of PostgreSQL as this is always a little bit problematic: