I have a conflict with the CATALOG_VERSION_NO
. Postgresql 15.4 and pg_control report that the cluster was initialized with version 202307071 but the server was compiled with 202209061. PG_VERSION
contains 15. Postgresql 16.0 reports the database was created with version 15, and changing PG_VERSION
to 16 creates a set of new errors.
Is there a method for resolving this conflict without losing the data?
Yes, the catalog version implies the major version (If the catalog version were between the ones associated with major releases, that would imply you are using some dev build of the database, like a daily, beta, or release candidate. but that is not the case here). The binaries you are using in attempting to start the server appear to be v15. The data directory was apparently initialized by v16.
However, if it were just this you should be getting the user friendlier error:
The fact that you don't get this message suggests you already have some sort of corruption going on. But we have no way of knowing just from this how severe the corruption is.
The simplest explanation is that it is a v16 database, but somehow PG_VERSION got changed to say 15. But:
Apparently the simple case is not the thing that happened. What are those errors you get? At this point you should be scrambling for any backups you might have, and making sure you have a read-only copy of them so that you can't accidentally mangle the only copy of them you do have (a surprising common occurrence when people are panicking).