Message tuning
authorPeter Eisentraut <peter_e@gmx.net>
Sun, 21 Mar 2010 00:17:59 +0000 (00:17 +0000)
committerPeter Eisentraut <peter_e@gmx.net>
Sun, 21 Mar 2010 00:17:59 +0000 (00:17 +0000)
src/backend/access/transam/xlog.c
src/backend/executor/nodeWindowAgg.c
src/backend/libpq/auth.c
src/backend/libpq/hba.c
src/backend/libpq/pqcomm.c
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
src/backend/replication/walreceiver.c
src/backend/storage/lmgr/lock.c
src/backend/tcop/postgres.c
src/backend/utils/init/postinit.c
src/backend/utils/misc/guc.c

index 29d64f0ff84947ee43ccd530865f3f3ab29a3237..dc062cacca4a5bf7a7f04a687a3d280875794301 100644 (file)
@@ -7,7 +7,7 @@
  * 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.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,
                     ControlFile->system_identifier);
            ereport(emode,
-                   (errmsg("WAL file is from different system"),
-                    errdetail("WAL file SYSID is %s, pg_control SYSID is %s",
+                   (errmsg("WAL file is from different database system"),
+                    errdetail("WAL file database system identifier is %s, pg_control database system identifier is %s.",
                               fhdrident_str, sysident_str)));
            return false;
        }
        if (longhdr->xlp_seg_size != XLogSegSize)
        {
            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.")));
            return false;
        }
        if (longhdr->xlp_xlog_blcksz != XLOG_BLCKSZ)
        {
            ereport(emode,
-                   (errmsg("WAL file is from different system"),
+                   (errmsg("WAL file is from different database system"),
                     errdetail("Incorrect XLOG_BLCKSZ in page header.")));
            return false;
        }
@@ -8202,7 +8202,7 @@ pg_stop_backup(PG_FUNCTION_ARGS)
            ereport(WARNING,
                    (errmsg("pg_stop_backup still waiting for all required WAL segments to be archived (%d seconds elapsed)",
                            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, "
                    "but the database backup will not be usable without all the WAL segments.")));
        }
index 4d76981b02ab1739b4355f8de7d1f0667d633fc5..de6d0385e920ff5aad5171066d2b95f9ac199443 100644 (file)
@@ -27,7 +27,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * 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)
                ereport(ERROR,
                        (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 */
            get_typlenbyval(exprType((Node *) winstate->startOffset->expr),
                            &len, &byval);
@@ -1256,7 +1256,7 @@ ExecWindowAgg(WindowAggState *winstate)
            if (isnull)
                ereport(ERROR,
                        (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 */
            get_typlenbyval(exprType((Node *) winstate->endOffset->expr),
                            &len, &byval);
index 8838113c575375ddcc7395735404ad7fa4a92071..17372844cfe45dc434ebe8641a954df4b59293dd 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * 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 == '/')
            {
                ereport(LOG,
-                       (errmsg("invalid character in username for LDAP authentication")));
+                       (errmsg("invalid character in user name for LDAP authentication")));
                return STATUS_ERROR;
            }
        }
@@ -2636,7 +2636,7 @@ CheckRADIUSAuth(Port *port)
    if (!pg_md5_binary(cryptvector, RADIUS_VECTOR_LENGTH + strlen(port->hba->radiussecret), encryptedpassword))
    {
        ereport(LOG,
-               (errmsg("could not perform md5 encryption of password")));
+               (errmsg("could not perform MD5 encryption of password")));
        pfree(cryptvector);
        return STATUS_ERROR;
    }
@@ -2825,7 +2825,7 @@ CheckRADIUSAuth(Port *port)
    else
    {
        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)));
        return STATUS_ERROR;
    }
index be6b2f742abe1883a930cd0f22d6e6c9ba1fb329..8cf7624a70ad293381b56e94a0b953c5bb28d54d 100644 (file)
@@ -10,7 +10,7 @@
  *
  *
  * 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,
                        (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\"",
                                    line_num, HbaFileName)));
                return false;
@@ -1281,7 +1281,7 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
        {
            ereport(LOG,
                    (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\"",
                                line_num, HbaFileName)));
            return false;
@@ -1747,7 +1747,7 @@ check_usermap(const char *usermap_name,
                return STATUS_OK;
        }
        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)));
        return STATUS_ERROR;
    }
index 38c2426761095db10e23e798be20272ddc832891..7bf82933d5c606e0b1a07bd6e44257b2d48f8c2a 100644 (file)
@@ -30,7 +30,7 @@
  * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
  * 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
    if (!pg_set_noblock(MyProcPort->sock))
        ereport(ERROR,
-               (errmsg("couldn't put socket to non-blocking mode: %m")));
+               (errmsg("could not set socket to non-blocking mode: %m")));
 #endif
    MyProcPort->noblock = true;
    PG_TRY();
@@ -889,7 +889,7 @@ pq_getbyte_if_available(unsigned char *c)
 #else
        if (!pg_set_block(MyProcPort->sock))
            ereport(FATAL,
-                   (errmsg("couldn't put socket to blocking mode: %m")));
+                   (errmsg("could not set socket to blocking mode: %m")));
 #endif
        MyProcPort->noblock = false;
        PG_RE_THROW();
@@ -900,7 +900,7 @@ pq_getbyte_if_available(unsigned char *c)
 #else
    if (!pg_set_block(MyProcPort->sock))
        ereport(FATAL,
-               (errmsg("couldn't put socket to blocking mode: %m")));
+               (errmsg("could not set socket to blocking mode: %m")));
 #endif
    MyProcPort->noblock = false;
 
index 7c74ec8052366828ebd3e97b688abbbfd4ae06c0..9e318e669d099bbb375c52580b910fb23c63cb39 100644 (file)
@@ -10,7 +10,7 @@
  *
  *
  * 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);
        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",
                        PQerrorMessage(streamConn))));
    }
@@ -114,7 +114,7 @@ libpqrcv_connect(char *conninfo, XLogRecPtr startpoint)
        PQclear(res);
        ereport(ERROR,
                (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)));
    }
    primary_sysid = PQgetvalue(res, 0, 0);
@@ -129,8 +129,8 @@ libpqrcv_connect(char *conninfo, XLogRecPtr startpoint)
    {
        PQclear(res);
        ereport(ERROR,
-               (errmsg("system differs between the primary and standby"),
-                errdetail("the primary SYSID is %s, standby SYSID is %s",
+               (errmsg("database system identifier differs between the primary and standby"),
+                errdetail("The primary's identifier is %s, the standby's identifier is %s.",
                           primary_sysid, standby_sysid)));
    }
 
@@ -152,7 +152,7 @@ libpqrcv_connect(char *conninfo, XLogRecPtr startpoint)
    res = PQexec(streamConn, cmd);
    if (PQresultStatus(res) != PGRES_COPY_OUT)
        ereport(ERROR,
-               (errmsg("could not start XLOG streaming: %s",
+               (errmsg("could not start WAL streaming: %s",
                        PQerrorMessage(streamConn))));
    PQclear(res);
 
@@ -275,7 +275,7 @@ libpqrcv_receive(int timeout, unsigned char *type, char **buffer, int *len)
 
        if (PQconsumeInput(streamConn) == 0)
            ereport(ERROR,
-                   (errmsg("could not receive data from XLOG stream: %s",
+                   (errmsg("could not receive data from WAL stream: %s",
                            PQerrorMessage(streamConn))));
    }
    justconnected = false;
@@ -297,12 +297,12 @@ libpqrcv_receive(int timeout, unsigned char *type, char **buffer, int *len)
        }
        PQclear(res);
        ereport(ERROR,
-               (errmsg("could not receive data from XLOG stream: %s",
+               (errmsg("could not receive data from WAL stream: %s",
                        PQerrorMessage(streamConn))));
    }
    if (rawlen < -1)
        ereport(ERROR,
-               (errmsg("could not receive data from XLOG stream: %s",
+               (errmsg("could not receive data from WAL stream: %s",
                        PQerrorMessage(streamConn))));
 
    /* Return received messages to caller */
index 9f86b0645d0e246f5abdb0fdd71b1e8519b6cd05..4dedcdc8b2c04263be2d67c3506fe09ee85f84e9 100644 (file)
@@ -29,7 +29,7 @@
  *
  *
  * 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())
            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 */
        ProcessWalRcvInterrupts();
index 75fd29f520053e8e1dae76dede9956f26522d7bf..b4a2a6b0e0df7f42f99283ecaf442324f29b0f82 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * 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
  *   A lock table is a shared memory hash table.  When
@@ -516,7 +516,7 @@ LockAcquireExtended(const LOCKTAG *locktag,
        lockmode > RowExclusiveLock)
        ereport(ERROR,
                (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]),
                 errhint("Only RowExclusiveLock or less can be acquired on database objects during recovery.")));
 
index 46756e7169606a05c305bb2ad9f7ba15d51d7b8f..287445b535e4f9411b108478b11673c398bc3c69 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * 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
  *   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.");
            break;
        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;
        case PROCSIG_RECOVERY_CONFLICT_SNAPSHOT:
            errdetail("User query might have needed to see row versions that must be removed.");
index 026ee47484477143a96e327f87c16c3f43c33190..6a92ede6f9b68dd83d705a7d6dbef7790a5c0ef4 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * 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)
        ereport(LOG,
-               (errmsg("connection authorized: user=%s database=replication",
-                       port->user_name)));
+               (errmsg("connection authorized: user=%s database=%s",
+                       port->user_name, "replication")));
    else if (Log_connections)
        ereport(LOG,
                (errmsg("connection authorized: user=%s database=%s",
index 5aefacc8d72b51798882e275ee0a9a3c551b9555..30e90cb3510dc0d3954ffa51656a16a883475d12 100644 (file)
@@ -10,7 +10,7 @@
  * Written by Peter Eisentraut <peter_e@gmx.net>.
  *
  * 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,
-           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, "
                  "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,
-           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
        },
        &MaxStandbyDelay,