Skip to content

Commit a43c951

Browse files
committed
PGPRO-1226: disable archiving_enable check
1 parent 277e410 commit a43c951

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

src/backup.c

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ static void pg_ptrack_clear(void);
109109
static bool pg_ptrack_support(void);
110110
static bool pg_ptrack_enable(void);
111111
static bool pg_is_in_recovery(void);
112-
static bool pg_archive_enabled(void);
113112
static bool pg_ptrack_get_and_clear_db(Oid dbOid, Oid tblspcOid);
114113
static char *pg_ptrack_get_and_clear(Oid tablespace_oid,
115114
Oid db_oid,
@@ -794,13 +793,6 @@ do_backup(time_t start_time)
794793
}
795794
}
796795

797-
/* archiving check */
798-
if (!current.stream && !pg_archive_enabled())
799-
elog(ERROR, "Archiving must be enabled for archive backup");
800-
801-
if (current.backup_mode == BACKUP_MODE_DIFF_PAGE && !pg_archive_enabled())
802-
elog(ERROR, "Archiving must be enabled for PAGE backup");
803-
804796
if (from_replica)
805797
{
806798
/* Check master connection options */
@@ -1119,34 +1111,6 @@ pg_is_in_recovery(void)
11191111
return false;
11201112
}
11211113

1122-
/*
1123-
* Check if archiving is enabled
1124-
*/
1125-
static bool
1126-
pg_archive_enabled(void)
1127-
{
1128-
PGresult *res_db;
1129-
1130-
res_db = pgut_execute(backup_conn, "show archive_mode", 0, NULL, true);
1131-
1132-
if (strcmp(PQgetvalue(res_db, 0, 0), "off") == 0)
1133-
{
1134-
PQclear(res_db);
1135-
return false;
1136-
}
1137-
PQclear(res_db);
1138-
1139-
res_db = pgut_execute(backup_conn, "show archive_command", 0, NULL, true);
1140-
if (strlen(PQgetvalue(res_db, 0, 0)) == 0)
1141-
{
1142-
PQclear(res_db);
1143-
return false;
1144-
}
1145-
PQclear(res_db);
1146-
1147-
return true;
1148-
}
1149-
11501114
/* Clear ptrack files in all databases of the instance we connected to */
11511115
static void
11521116
pg_ptrack_clear(void)

0 commit comments

Comments
 (0)