stop_backup_warning.patch
text/x-patch
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
| File | + | − |
|---|---|---|
| src/backend/access/transam/xlog.c | 8 | 6 |
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 66cc004..d7559b8 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -8619,6 +8619,14 @@ pg_stop_backup(PG_FUNCTION_ARGS)
snprintf(stopxlogstr, sizeof(stopxlogstr), "%X/%X",
stoppoint.xlogid, stoppoint.xrecoff);
+
+ if (XLogArchivingActive())
+ ereport(NOTICE,
+ (errmsg("pg_stop_backup complete, all required WAL segments have been archived")));
+ else
+ ereport(NOTICE,
+ (errmsg("WAL archiving is not enabled; you must ensure that all required WAL segments are copied through other means to complete the backup")));
+
PG_RETURN_TEXT_P(cstring_to_text(stopxlogstr));
}
@@ -8866,13 +8874,7 @@ do_pg_stop_backup(char *labelfile)
"but the database backup will not be usable without all the WAL segments.")));
}
}
-
- ereport(NOTICE,
- (errmsg("pg_stop_backup complete, all required WAL segments have been archived")));
}
- else
- ereport(NOTICE,
- (errmsg("WAL archiving is not enabled; you must ensure that all required WAL segments are copied through other means to complete the backup")));
/*
* We're done. As a convenience, return the ending WAL location.