File tree 1 file changed +9
-1
lines changed
src/backend/access/transam
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 7
7
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
8
8
* Portions Copyright (c) 1994, Regents of the University of California
9
9
*
10
- * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.176 2004/11/05 17:10:56 petere Exp $
10
+ * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.177 2004/11/17 02:22:54 neilc Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -5266,6 +5266,14 @@ pg_start_backup(PG_FUNCTION_ARGS)
5266
5266
ereport (ERROR ,
5267
5267
(errcode (ERRCODE_INSUFFICIENT_PRIVILEGE ),
5268
5268
(errmsg ("must be superuser to run a backup" ))));
5269
+
5270
+ if (!XLogArchivingActive ())
5271
+ ereport (ERROR ,
5272
+ (errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ),
5273
+ (errmsg ("WAL archiving is not configured" ),
5274
+ (errhint ("archive_command must be defined before "
5275
+ "online backups can be safely made." )))));
5276
+
5269
5277
backupidstr = DatumGetCString (DirectFunctionCall1 (textout ,
5270
5278
PointerGetDatum (backupid )));
5271
5279
You can’t perform that action at this time.
0 commit comments