Thread: Barman database recovery and collation version mismatch
Hello,
I am currently running a pg v 15.2 database in a docker container, which is being backed up by barman (v 3.2) on a remote host also with pg v 15.2 installed, although not in a docker container. During DR tests, our normal procedure is to recover the database and then validate record counts, etc. in the pg database running on the remote host running barman (kind of a staging or auxiliary database, if you like). When I log into the database, however, I am getting the following warning:
WARNING: database "--" has a collation version mismatch
DETAIL: The database was created using collation version 2.31, but the operating system provides version 2.17.
HINT: Rebuild all objects in this database that use the default collation and run ALTER DATABASE -- REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
My intent in a real life DR scenario is to provide a pg_dump of this database to my end user who can pg_restore it to the pg database running in the docker container. Is running the reindex and collation refresh necessary prior to running pg_dump?
Thank you,
Matt