When i run metasploit i get this message:
WARN: Version mismatch for collation in database 'msf'
DETAIL: The database was created with collation version 2.36, but the operating system provides version 2.37.
HINT: Rebuild all objects in this database that use the primary collation and ALTER DATABASE msf REFRESH COLLATION VERSION, or build PostgreSQL with the correct library version.
I’m not good at databases and SQL, i tried to use sudo -u postgres psql
and execute command in hint ALTER DATABASE msf REFRESH COLLATION VERSION
but nothing happened.
2
Answers
This commands helped me:
The issue is that all objects depending on the database default collation need to be rebuilt using
REINDEX
before the default collation version can be refreshed using the commandALTER DATABASE 'msf' REFRESH COLLATION VERSION
.This will update the system catalog to record the current collation version and will make the
WARN: Version mismatch for collation in database 'msf'
warning go away.The following query can be used to identify all collations in the current database that need to be refreshed and the objects that depend on them:
You can read more about this in the "Notes" here: https://www.postgresql.org/docs/current/sql-altercollation.html