-<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.512 2010/04/03 07:53:02 petere Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.513 2010/04/07 06:12:52 heikki Exp $ -->
<chapter id="functions">
<title>Functions and Operators</title>
<para>
The functions shown in <xref
linkend="functions-admin-backup-table"> assist in making on-line backups.
- Use of the first three functions is restricted to superusers. The first
- five functions cannot be executed during recovery.
+ These functions cannot be executed during recovery.
+ Use of the first three functions is restricted to superusers.
</para>
<table id="functions-admin-backup-table">
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.389 2010/04/06 17:51:58 sriggs Exp $
+ * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.390 2010/04/07 06:12:52 heikki Exp $
*
*-------------------------------------------------------------------------
*/
HeapTuple resultHeapTuple;
Datum result;
+ if (RecoveryInProgress())
+ ereport(ERROR,
+ (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
+ errmsg("recovery is in progress"),
+ errhint("pg_xlogfile_name_offset() cannot be executed during recovery.")));
+
/*
* Read input and parse
*/
XLogRecPtr locationpoint;
char xlogfilename[MAXFNAMELEN];
+ if (RecoveryInProgress())
+ ereport(ERROR,
+ (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
+ errmsg("recovery is in progress"),
+ errhint("pg_xlogfile_name() cannot be executed during recovery.")));
+
locationstr = text_to_cstring(location);
if (sscanf(locationstr, "%X/%X", &uxlogid, &uxrecoff) != 2)