aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_upgrade/controldata.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_upgrade/controldata.c')
-rw-r--r--src/bin/pg_upgrade/controldata.c42
1 files changed, 1 insertions, 41 deletions
diff --git a/src/bin/pg_upgrade/controldata.c b/src/bin/pg_upgrade/controldata.c
index a0aa995bbde..39bcaa8fe1a 100644
--- a/src/bin/pg_upgrade/controldata.c
+++ b/src/bin/pg_upgrade/controldata.c
@@ -9,16 +9,10 @@
#include "postgres_fe.h"
-#include <dirent.h>
#include <ctype.h>
#include "pg_upgrade.h"
-#include "access/xlog_internal.h"
-#include "common/controldata_utils.h"
-#include "common/file_utils.h"
-#include "common/kmgr_utils.h"
-
/*
* get_control_data()
*
@@ -65,7 +59,6 @@ get_control_data(ClusterInfo *cluster, bool live_check)
bool got_date_is_int = false;
bool got_data_checksum_version = false;
bool got_cluster_state = false;
- int got_file_encryption_keylen = 0;
char *lc_collate = NULL;
char *lc_ctype = NULL;
char *lc_monetary = NULL;
@@ -209,13 +202,6 @@ get_control_data(ClusterInfo *cluster, bool live_check)
got_data_checksum_version = true;
}
- /* Only in <= 14 */
- if (GET_MAJOR_VERSION(cluster->major_version) <= 1400)
- {
- cluster->controldata.file_encryption_keylen = 0;
- got_file_encryption_keylen = true;
- }
-
/* we have the result of cmd in "output". so parse it line by line now */
while (fgets(bufin, sizeof(bufin), output))
{
@@ -499,18 +485,6 @@ get_control_data(ClusterInfo *cluster, bool live_check)
cluster->controldata.data_checksum_version = str2uint(p);
got_data_checksum_version = true;
}
- else if ((p = strstr(bufin, "File encryption key length:")) != NULL)
- {
- p = strchr(p, ':');
-
- if (p == NULL || strlen(p) <= 1)
- pg_fatal("%d: controldata retrieval problem\n", __LINE__);
-
- p++; /* remove ':' char */
- /* used later for contrib check */
- cluster->controldata.file_encryption_keylen = atoi(p);
- got_file_encryption_keylen = true;
- }
}
pclose(output);
@@ -565,8 +539,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
!got_index || !got_toast ||
(!got_large_object &&
cluster->controldata.ctrl_ver >= LARGE_OBJECT_SIZE_PG_CONTROL_VER) ||
- !got_date_is_int || !got_data_checksum_version ||
- !got_file_encryption_keylen)
+ !got_date_is_int || !got_data_checksum_version)
{
if (cluster == &old_cluster)
pg_log(PG_REPORT,
@@ -632,10 +605,6 @@ get_control_data(ClusterInfo *cluster, bool live_check)
if (!got_data_checksum_version)
pg_log(PG_REPORT, " data checksum version\n");
- /* value added in Postgres 14 */
- if (!got_file_encryption_keylen)
- pg_log(PG_REPORT, " file encryption key length\n");
-
pg_fatal("Cannot continue without required control information, terminating\n");
}
}
@@ -700,15 +669,6 @@ check_control_data(ControlData *oldctrl,
pg_fatal("old cluster uses data checksums but the new one does not\n");
else if (oldctrl->data_checksum_version != newctrl->data_checksum_version)
pg_fatal("old and new cluster pg_controldata checksum versions do not match\n");
-
- /*
- * We cannot upgrade if the old cluster file encryption key length
- * doesn't match the new one.
-
- */
- if (oldctrl->file_encryption_keylen != newctrl->file_encryption_keylen)
- pg_fatal("old and new clusters use different file encryption key lengths or\n"
- "one cluster uses encryption and the other does not");
}