Message tuning

This commit is contained in:
Peter Eisentraut 2010-03-21 00:17:59 +00:00
parent 1dff2a0f25
commit c248d17120
11 changed files with 42 additions and 42 deletions

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.383 2010/03/19 11:05:14 sriggs Exp $ * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.384 2010/03/21 00:17:58 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -3876,22 +3876,22 @@ ValidXLOGHeader(XLogPageHeader hdr, int emode)
snprintf(sysident_str, sizeof(sysident_str), UINT64_FORMAT, snprintf(sysident_str, sizeof(sysident_str), UINT64_FORMAT,
ControlFile->system_identifier); ControlFile->system_identifier);
ereport(emode, ereport(emode,
(errmsg("WAL file is from different system"), (errmsg("WAL file is from different database system"),
errdetail("WAL file SYSID is %s, pg_control SYSID is %s", errdetail("WAL file database system identifier is %s, pg_control database system identifier is %s.",
fhdrident_str, sysident_str))); fhdrident_str, sysident_str)));
return false; return false;
} }
if (longhdr->xlp_seg_size != XLogSegSize) if (longhdr->xlp_seg_size != XLogSegSize)
{ {
ereport(emode, ereport(emode,
(errmsg("WAL file is from different system"), (errmsg("WAL file is from different database system"),
errdetail("Incorrect XLOG_SEG_SIZE in page header."))); errdetail("Incorrect XLOG_SEG_SIZE in page header.")));
return false; return false;
} }
if (longhdr->xlp_xlog_blcksz != XLOG_BLCKSZ) if (longhdr->xlp_xlog_blcksz != XLOG_BLCKSZ)
{ {
ereport(emode, ereport(emode,
(errmsg("WAL file is from different system"), (errmsg("WAL file is from different database system"),
errdetail("Incorrect XLOG_BLCKSZ in page header."))); errdetail("Incorrect XLOG_BLCKSZ in page header.")));
return false; return false;
} }
@ -8202,7 +8202,7 @@ pg_stop_backup(PG_FUNCTION_ARGS)
ereport(WARNING, ereport(WARNING,
(errmsg("pg_stop_backup still waiting for all required WAL segments to be archived (%d seconds elapsed)", (errmsg("pg_stop_backup still waiting for all required WAL segments to be archived (%d seconds elapsed)",
waits), waits),
errhint("Check that your archive_command is executing properly. " errhint("Check that your archive_command is executing properly. "
"pg_stop_backup can be cancelled safely, " "pg_stop_backup can be cancelled safely, "
"but the database backup will not be usable without all the WAL segments."))); "but the database backup will not be usable without all the WAL segments.")));
} }

View File

@ -27,7 +27,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/nodeWindowAgg.c,v 1.12 2010/02/26 02:00:42 momjian Exp $ * $PostgreSQL: pgsql/src/backend/executor/nodeWindowAgg.c,v 1.13 2010/03/21 00:17:58 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -1230,7 +1230,7 @@ ExecWindowAgg(WindowAggState *winstate)
if (isnull) if (isnull)
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED), (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED),
errmsg("frame starting offset must not be NULL"))); errmsg("frame starting offset must not be null")));
/* copy value into query-lifespan context */ /* copy value into query-lifespan context */
get_typlenbyval(exprType((Node *) winstate->startOffset->expr), get_typlenbyval(exprType((Node *) winstate->startOffset->expr),
&len, &byval); &len, &byval);
@ -1256,7 +1256,7 @@ ExecWindowAgg(WindowAggState *winstate)
if (isnull) if (isnull)
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED), (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED),
errmsg("frame ending offset must not be NULL"))); errmsg("frame ending offset must not be null")));
/* copy value into query-lifespan context */ /* copy value into query-lifespan context */
get_typlenbyval(exprType((Node *) winstate->endOffset->expr), get_typlenbyval(exprType((Node *) winstate->endOffset->expr),
&len, &byval); &len, &byval);

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.196 2010/03/13 14:55:57 momjian Exp $ * $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.197 2010/03/21 00:17:58 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -2271,7 +2271,7 @@ CheckLDAPAuth(Port *port)
*c == '/') *c == '/')
{ {
ereport(LOG, ereport(LOG,
(errmsg("invalid character in username for LDAP authentication"))); (errmsg("invalid character in user name for LDAP authentication")));
return STATUS_ERROR; return STATUS_ERROR;
} }
} }
@ -2636,7 +2636,7 @@ CheckRADIUSAuth(Port *port)
if (!pg_md5_binary(cryptvector, RADIUS_VECTOR_LENGTH + strlen(port->hba->radiussecret), encryptedpassword)) if (!pg_md5_binary(cryptvector, RADIUS_VECTOR_LENGTH + strlen(port->hba->radiussecret), encryptedpassword))
{ {
ereport(LOG, ereport(LOG,
(errmsg("could not perform md5 encryption of password"))); (errmsg("could not perform MD5 encryption of password")));
pfree(cryptvector); pfree(cryptvector);
return STATUS_ERROR; return STATUS_ERROR;
} }
@ -2825,7 +2825,7 @@ CheckRADIUSAuth(Port *port)
else else
{ {
ereport(LOG, ereport(LOG,
(errmsg("RADIUS response has invalid code (%i) for user '%s'", (errmsg("RADIUS response has invalid code (%i) for user \"%s\"",
receivepacket->code, port->user_name))); receivepacket->code, port->user_name)));
return STATUS_ERROR; return STATUS_ERROR;
} }

View File

@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.202 2010/03/08 09:57:26 mha Exp $ * $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.203 2010/03/21 00:17:58 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -1271,7 +1271,7 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
{ {
ereport(LOG, ereport(LOG,
(errcode(ERRCODE_CONFIG_FILE_ERROR), (errcode(ERRCODE_CONFIG_FILE_ERROR),
errmsg("cannot use ldapbasedn, ldapbinddn, ldapbindpasswd or ldapsearchattribute together with ldapprefix"), errmsg("cannot use ldapbasedn, ldapbinddn, ldapbindpasswd, or ldapsearchattribute together with ldapprefix"),
errcontext("line %d of configuration file \"%s\"", errcontext("line %d of configuration file \"%s\"",
line_num, HbaFileName))); line_num, HbaFileName)));
return false; return false;
@ -1281,7 +1281,7 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
{ {
ereport(LOG, ereport(LOG,
(errcode(ERRCODE_CONFIG_FILE_ERROR), (errcode(ERRCODE_CONFIG_FILE_ERROR),
errmsg("authentication method \"ldap\" requires argument \"ldapbasedn\", \"ldapprefix\" or \"ldapsuffix\" to be set"), errmsg("authentication method \"ldap\" requires argument \"ldapbasedn\", \"ldapprefix\", or \"ldapsuffix\" to be set"),
errcontext("line %d of configuration file \"%s\"", errcontext("line %d of configuration file \"%s\"",
line_num, HbaFileName))); line_num, HbaFileName)));
return false; return false;
@ -1747,7 +1747,7 @@ check_usermap(const char *usermap_name,
return STATUS_OK; return STATUS_OK;
} }
ereport(LOG, ereport(LOG,
(errmsg("provided username (%s) and authenticated username (%s) don't match", (errmsg("provided user name (%s) and authenticated user name (%s) do not match",
auth_user, pg_role))); auth_user, pg_role)));
return STATUS_ERROR; return STATUS_ERROR;
} }

View File

@ -30,7 +30,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.208 2010/03/13 16:56:37 momjian Exp $ * $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.209 2010/03/21 00:17:58 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -843,7 +843,7 @@ pq_getbyte_if_available(unsigned char *c)
#else #else
if (!pg_set_noblock(MyProcPort->sock)) if (!pg_set_noblock(MyProcPort->sock))
ereport(ERROR, ereport(ERROR,
(errmsg("couldn't put socket to non-blocking mode: %m"))); (errmsg("could not set socket to non-blocking mode: %m")));
#endif #endif
MyProcPort->noblock = true; MyProcPort->noblock = true;
PG_TRY(); PG_TRY();
@ -889,7 +889,7 @@ pq_getbyte_if_available(unsigned char *c)
#else #else
if (!pg_set_block(MyProcPort->sock)) if (!pg_set_block(MyProcPort->sock))
ereport(FATAL, ereport(FATAL,
(errmsg("couldn't put socket to blocking mode: %m"))); (errmsg("could not set socket to blocking mode: %m")));
#endif #endif
MyProcPort->noblock = false; MyProcPort->noblock = false;
PG_RE_THROW(); PG_RE_THROW();
@ -900,7 +900,7 @@ pq_getbyte_if_available(unsigned char *c)
#else #else
if (!pg_set_block(MyProcPort->sock)) if (!pg_set_block(MyProcPort->sock))
ereport(FATAL, ereport(FATAL,
(errmsg("couldn't put socket to blocking mode: %m"))); (errmsg("could not set socket to blocking mode: %m")));
#endif #endif
MyProcPort->noblock = false; MyProcPort->noblock = false;

View File

@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c,v 1.7 2010/03/19 19:19:38 sriggs Exp $ * $PostgreSQL: pgsql/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c,v 1.8 2010/03/21 00:17:58 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -102,7 +102,7 @@ libpqrcv_connect(char *conninfo, XLogRecPtr startpoint)
{ {
PQclear(res); PQclear(res);
ereport(ERROR, ereport(ERROR,
(errmsg("could not receive the SYSID and timeline ID from " (errmsg("could not receive database system identifier and timeline ID from "
"the primary server: %s", "the primary server: %s",
PQerrorMessage(streamConn)))); PQerrorMessage(streamConn))));
} }
@ -114,7 +114,7 @@ libpqrcv_connect(char *conninfo, XLogRecPtr startpoint)
PQclear(res); PQclear(res);
ereport(ERROR, ereport(ERROR,
(errmsg("invalid response from primary server"), (errmsg("invalid response from primary server"),
errdetail("expected 1 tuple with 2 fields, got %d tuples with %d fields", errdetail("Expected 1 tuple with 2 fields, got %d tuples with %d fields.",
ntuples, nfields))); ntuples, nfields)));
} }
primary_sysid = PQgetvalue(res, 0, 0); primary_sysid = PQgetvalue(res, 0, 0);
@ -129,8 +129,8 @@ libpqrcv_connect(char *conninfo, XLogRecPtr startpoint)
{ {
PQclear(res); PQclear(res);
ereport(ERROR, ereport(ERROR,
(errmsg("system differs between the primary and standby"), (errmsg("database system identifier differs between the primary and standby"),
errdetail("the primary SYSID is %s, standby SYSID is %s", errdetail("The primary's identifier is %s, the standby's identifier is %s.",
primary_sysid, standby_sysid))); primary_sysid, standby_sysid)));
} }
@ -152,7 +152,7 @@ libpqrcv_connect(char *conninfo, XLogRecPtr startpoint)
res = PQexec(streamConn, cmd); res = PQexec(streamConn, cmd);
if (PQresultStatus(res) != PGRES_COPY_OUT) if (PQresultStatus(res) != PGRES_COPY_OUT)
ereport(ERROR, ereport(ERROR,
(errmsg("could not start XLOG streaming: %s", (errmsg("could not start WAL streaming: %s",
PQerrorMessage(streamConn)))); PQerrorMessage(streamConn))));
PQclear(res); PQclear(res);
@ -275,7 +275,7 @@ libpqrcv_receive(int timeout, unsigned char *type, char **buffer, int *len)
if (PQconsumeInput(streamConn) == 0) if (PQconsumeInput(streamConn) == 0)
ereport(ERROR, ereport(ERROR,
(errmsg("could not receive data from XLOG stream: %s", (errmsg("could not receive data from WAL stream: %s",
PQerrorMessage(streamConn)))); PQerrorMessage(streamConn))));
} }
justconnected = false; justconnected = false;
@ -297,12 +297,12 @@ libpqrcv_receive(int timeout, unsigned char *type, char **buffer, int *len)
} }
PQclear(res); PQclear(res);
ereport(ERROR, ereport(ERROR,
(errmsg("could not receive data from XLOG stream: %s", (errmsg("could not receive data from WAL stream: %s",
PQerrorMessage(streamConn)))); PQerrorMessage(streamConn))));
} }
if (rawlen < -1) if (rawlen < -1)
ereport(ERROR, ereport(ERROR,
(errmsg("could not receive data from XLOG stream: %s", (errmsg("could not receive data from WAL stream: %s",
PQerrorMessage(streamConn)))); PQerrorMessage(streamConn))));
/* Return received messages to caller */ /* Return received messages to caller */

View File

@ -29,7 +29,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/replication/walreceiver.c,v 1.6 2010/02/26 02:00:57 momjian Exp $ * $PostgreSQL: pgsql/src/backend/replication/walreceiver.c,v 1.7 2010/03/21 00:17:58 petere Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -283,7 +283,7 @@ WalReceiverMain(void)
*/ */
if (!RecoveryInProgress()) if (!RecoveryInProgress())
ereport(FATAL, ereport(FATAL,
(errmsg("cannot continue XLOG streaming, recovery has already ended"))); (errmsg("cannot continue WAL streaming, recovery has already ended")));
/* Process any requests or signals received recently */ /* Process any requests or signals received recently */
ProcessWalRcvInterrupts(); ProcessWalRcvInterrupts();

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/storage/lmgr/lock.c,v 1.195 2010/02/26 02:01:00 momjian Exp $ * $PostgreSQL: pgsql/src/backend/storage/lmgr/lock.c,v 1.196 2010/03/21 00:17:58 petere Exp $
* *
* NOTES * NOTES
* A lock table is a shared memory hash table. When * A lock table is a shared memory hash table. When
@ -516,7 +516,7 @@ LockAcquireExtended(const LOCKTAG *locktag,
lockmode > RowExclusiveLock) lockmode > RowExclusiveLock)
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("cannot acquire lockmode %s on database objects while recovery is in progress", errmsg("cannot acquire lock mode %s on database objects while recovery is in progress",
lockMethodTable->lockModeNames[lockmode]), lockMethodTable->lockModeNames[lockmode]),
errhint("Only RowExclusiveLock or less can be acquired on database objects during recovery."))); errhint("Only RowExclusiveLock or less can be acquired on database objects during recovery.")));

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.591 2010/02/26 02:01:01 momjian Exp $ * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.592 2010/03/21 00:17:58 petere Exp $
* *
* NOTES * NOTES
* this is the "main" module of the postgres backend and * this is the "main" module of the postgres backend and
@ -2273,7 +2273,7 @@ errdetail_recovery_conflict(void)
errdetail("User was holding a relation lock for too long."); errdetail("User was holding a relation lock for too long.");
break; break;
case PROCSIG_RECOVERY_CONFLICT_TABLESPACE: case PROCSIG_RECOVERY_CONFLICT_TABLESPACE:
errdetail("User was or may have been using tablespace that must be dropped."); errdetail("User was or might have been using tablespace that must be dropped.");
break; break;
case PROCSIG_RECOVERY_CONFLICT_SNAPSHOT: case PROCSIG_RECOVERY_CONFLICT_SNAPSHOT:
errdetail("User query might have needed to see row versions that must be removed."); errdetail("User query might have needed to see row versions that must be removed.");

View File

@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.205 2010/03/19 19:19:38 sriggs Exp $ * $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.206 2010/03/21 00:17:59 petere Exp $
* *
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
@ -222,8 +222,8 @@ PerformAuthentication(Port *port)
*/ */
if (am_walsender) if (am_walsender)
ereport(LOG, ereport(LOG,
(errmsg("connection authorized: user=%s database=replication", (errmsg("connection authorized: user=%s database=%s",
port->user_name))); port->user_name, "replication")));
else if (Log_connections) else if (Log_connections)
ereport(LOG, ereport(LOG,
(errmsg("connection authorized: user=%s database=%s", (errmsg("connection authorized: user=%s database=%s",

View File

@ -10,7 +10,7 @@
* Written by Peter Eisentraut <peter_e@gmx.net>. * Written by Peter Eisentraut <peter_e@gmx.net>.
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.543 2010/02/26 02:01:14 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.544 2010/03/21 00:17:59 petere Exp $
* *
*-------------------------------------------------------------------- *--------------------------------------------------------------------
*/ */
@ -1246,7 +1246,7 @@ static struct config_bool ConfigureNamesBool[] =
{ {
{"lo_compat_privileges", PGC_SUSET, COMPAT_OPTIONS_PREVIOUS, {"lo_compat_privileges", PGC_SUSET, COMPAT_OPTIONS_PREVIOUS,
gettext_noop("Enables backward compatibility mode for privilege checks on large objects"), gettext_noop("Enables backward compatibility mode for privilege checks on large objects."),
gettext_noop("Skips privilege checks when reading or modifying large objects, " gettext_noop("Skips privilege checks when reading or modifying large objects, "
"for compatibility with PostgreSQL releases prior to 9.0.") "for compatibility with PostgreSQL releases prior to 9.0.")
}, },
@ -1378,7 +1378,7 @@ static struct config_int ConfigureNamesInt[] =
{ {
{"max_standby_delay", PGC_SIGHUP, WAL_SETTINGS, {"max_standby_delay", PGC_SIGHUP, WAL_SETTINGS,
gettext_noop("Sets the maximum delay to avoid conflict processing on Hot Standby servers."), gettext_noop("Sets the maximum delay to avoid conflict processing on hot standby servers."),
NULL NULL
}, },
&MaxStandbyDelay, &MaxStandbyDelay,