diff --git a/src/common/controldata_utils.c b/src/common/controldata_utils.c
index abfe7065f5..0b011741e3 100644
--- a/src/common/controldata_utils.c
+++ b/src/common/controldata_utils.c
@@ -27,6 +27,9 @@
 #include "catalog/pg_control.h"
 #include "common/controldata_utils.h"
 #include "port/pg_crc32c.h"
+#ifndef FRONTEND
+#include "storage/fd.h"
+#endif
 
 /*
  * get_controlfile(char *DataDir, const char *progname, bool *crc_ok_p)
@@ -45,13 +48,20 @@ get_controlfile(const char *DataDir, const char *progname, bool *crc_ok_p)
 	char		ControlFilePath[MAXPGPATH];
 	pg_crc32c	crc;
 	int			r;
+	int			flags = O_RDONLY | PG_BINARY;
 
 	AssertArg(crc_ok_p);
 
 	ControlFile = palloc(sizeof(ControlFileData));
 	snprintf(ControlFilePath, MAXPGPATH, "%s/global/pg_control", DataDir);
 
-	if ((fd = open(ControlFilePath, O_RDONLY | PG_BINARY, 0)) == -1)
+#ifndef FRONTEND
+	fd = BasicOpenFile(ControlFilePath, flags);
+#else
+	fd = open(ControlFilePath, flags, 0);
+#endif
+
+	if (fd < 0)
 #ifndef FRONTEND
 		ereport(ERROR,
 				(errcode_for_file_access(),
