mirror of https://github.com/citusdata/citus.git
Fix incorrect call to CheckInstalledVersion
During version update, we indirectly calld CheckInstalledVersion via ChackCitusVersions. This obviously fails because during version update it is expected to have version mismatch between installed version and binary version. Thus, we remove that ChackCitusVersions. We now only call ChackAvailableVersion.pull/1427/head
parent
1ea96b626b
commit
c7bfa06cb9
|
@ -1419,11 +1419,9 @@ ErrorIfUnstableCreateOrAlterExtensionStmt(Node *parsetree)
|
|||
{
|
||||
/*
|
||||
* No version was specified, so PostgreSQL will use the default_version
|
||||
* from the citus.control file. In case a new default is available, we
|
||||
* will force a compatibility check of the latest available version.
|
||||
* from the citus.control file.
|
||||
*/
|
||||
citusVersionKnownCompatible = false;
|
||||
CheckCitusVersion(ERROR);
|
||||
CheckAvailableVersion(ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ static Oid workerHashFunctionId = InvalidOid;
|
|||
/* Citus extension version variables */
|
||||
bool EnableVersionChecks = true; /* version checks are enabled */
|
||||
|
||||
bool citusVersionKnownCompatible = false;
|
||||
static bool citusVersionKnownCompatible = false;
|
||||
|
||||
/* Hash table for informations about each partition */
|
||||
static HTAB *DistTableCacheHash = NULL;
|
||||
|
@ -143,7 +143,6 @@ static bool HasUniformHashDistribution(ShardInterval **shardIntervalArray,
|
|||
static bool HasUninitializedShardInterval(ShardInterval **sortedShardIntervalArray,
|
||||
int shardCount);
|
||||
static bool CheckInstalledVersion(int elevel);
|
||||
static bool CheckAvailableVersion(int elevel);
|
||||
static char * AvailableExtensionVersion(void);
|
||||
static char * InstalledExtensionVersion(void);
|
||||
static bool HasOverlappingShardInterval(ShardInterval **shardIntervalArray,
|
||||
|
@ -1181,13 +1180,15 @@ CheckCitusVersion(int elevel)
|
|||
* this function logs an error with the specified elevel and returns false,
|
||||
* otherwise it returns true.
|
||||
*/
|
||||
static bool
|
||||
bool
|
||||
CheckAvailableVersion(int elevel)
|
||||
{
|
||||
char *availableVersion = NULL;
|
||||
|
||||
Assert(CitusHasBeenLoaded());
|
||||
Assert(EnableVersionChecks);
|
||||
if (!EnableVersionChecks)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
availableVersion = AvailableExtensionVersion();
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include "utils/hsearch.h"
|
||||
|
||||
extern bool EnableVersionChecks;
|
||||
extern bool citusVersionKnownCompatible;
|
||||
|
||||
/*
|
||||
* Representation of a table's metadata that is frequently used for
|
||||
|
@ -80,6 +79,7 @@ extern void CitusInvalidateRelcacheByShardId(int64 shardId);
|
|||
|
||||
extern bool CitusHasBeenLoaded(void);
|
||||
extern bool CheckCitusVersion(int elevel);
|
||||
extern bool CheckAvailableVersion(int elevel);
|
||||
bool MajorVersionsCompatible(char *leftVersion, char *rightVersion);
|
||||
|
||||
/* access WorkerNodeHash */
|
||||
|
|
Loading…
Reference in New Issue