Message style improvements
authorPeter Eisentraut <peter@eisentraut.org>
Sat, 24 Sep 2022 22:38:35 +0000 (18:38 -0400)
committerPeter Eisentraut <peter@eisentraut.org>
Sat, 24 Sep 2022 22:41:25 +0000 (18:41 -0400)
29 files changed:
src/backend/access/transam/xlogprefetcher.c
src/backend/access/transam/xlogreader.c
src/backend/backup/basebackup.c
src/backend/backup/basebackup_server.c
src/backend/catalog/pg_publication.c
src/backend/commands/dbcommands.c
src/backend/commands/publicationcmds.c
src/backend/commands/subscriptioncmds.c
src/backend/commands/trigger.c
src/backend/executor/nodeModifyTable.c
src/backend/postmaster/pgarch.c
src/backend/replication/logical/tablesync.c
src/backend/replication/logical/worker.c
src/backend/replication/walsender.c
src/backend/utils/activity/pgstat.c
src/backend/utils/activity/pgstat_xact.c
src/bin/pg_basebackup/pg_basebackup.c
src/bin/pg_basebackup/pg_receivewal.c
src/bin/pg_basebackup/streamutil.c
src/bin/pg_basebackup/t/010_pg_basebackup.pl
src/bin/pg_basebackup/t/020_pg_receivewal.pl
src/bin/scripts/t/020_createdb.pl
src/common/compression.c
src/test/recovery/t/006_logical_decoding.pl
src/test/regress/expected/foreign_key.out
src/test/regress/expected/publication.out
src/test/regress/expected/triggers.out
src/test/subscription/t/027_nosuperuser.pl
src/test/subscription/t/029_on_error.pl

index 342960263cbe52314276b690470ef2f4260bc904..8f5d4253320a6e32824a21ed32a2876815b6945a 100644 (file)
@@ -1089,7 +1089,7 @@ check_recovery_prefetch(int *new_value, void **extra, GucSource source)
 #ifndef USE_PREFETCH
        if (*new_value == RECOVERY_PREFETCH_ON)
        {
-               GUC_check_errdetail("recovery_prefetch not supported on platforms that lack posix_fadvise().");
+               GUC_check_errdetail("recovery_prefetch is not supported on platforms that lack posix_fadvise().");
                return false;
        }
 #endif
index c1c9f1995bcb7a0c3cb36315453346161123104d..4d6c34e0fc541be3d2e5ea73de043c3581d90f90 100644 (file)
@@ -1963,10 +1963,10 @@ XLogRecGetBlockTag(XLogReaderState *record, uint8 block_id,
                                                                        blknum, NULL))
        {
 #ifndef FRONTEND
-               elog(ERROR, "failed to locate backup block with ID %d in WAL record",
+               elog(ERROR, "could not locate backup block with ID %d in WAL record",
                         block_id);
 #else
-               pg_fatal("failed to locate backup block with ID %d in WAL record",
+               pg_fatal("could not locate backup block with ID %d in WAL record",
                                 block_id);
 #endif
        }
index dd103a8689f37c82b26af55799c3c16e8ac4960f..459de55cb4ac69a40d16c2e6a6517821ee07a326 100644 (file)
@@ -863,7 +863,7 @@ parse_basebackup_options(List *options, basebackup_options *opt)
                        if (!parse_compress_algorithm(optval, &opt->compression))
                                ereport(ERROR,
                                                (errcode(ERRCODE_SYNTAX_ERROR),
-                                                errmsg("unrecognized compression algorithm \"%s\"",
+                                                errmsg("unrecognized compression algorithm: \"%s\"",
                                                                optval)));
                        o_compression = true;
                }
@@ -919,7 +919,7 @@ parse_basebackup_options(List *options, basebackup_options *opt)
        if (o_compression_detail && !o_compression)
                ereport(ERROR,
                                (errcode(ERRCODE_SYNTAX_ERROR),
-                                errmsg("compression detail requires compression")));
+                                errmsg("compression detail cannot be specified unless compression is enabled")));
 
        if (o_compression)
        {
index d020a92bfab58eb371c61bdd9dbb264a98748a50..0258d7a03b3ee8542bf8bce73b66468ad4b690d5 100644 (file)
@@ -72,7 +72,7 @@ bbsink_server_new(bbsink *next, char *pathname)
        if (!has_privs_of_role(GetUserId(), ROLE_PG_WRITE_SERVER_FILES))
                ereport(ERROR,
                                (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
-                                errmsg("must be superuser or a role with privileges of the pg_write_server_files role to create server backup")));
+                                errmsg("must be superuser or a role with privileges of the pg_write_server_files role to create backup stored on server")));
        CommitTransactionCommand();
 
        /*
@@ -86,7 +86,7 @@ bbsink_server_new(bbsink *next, char *pathname)
        if (!is_absolute_path(pathname))
                ereport(ERROR,
                                (errcode(ERRCODE_INVALID_NAME),
-                                errmsg("relative path not allowed for server backup")));
+                                errmsg("relative path not allowed for backup stored on server")));
 
        switch (pg_check_dir(pathname))
        {
index cd48cb6c469c9cfaa9ee353e03e74023b7662ab0..59967098b3ff71f9108b9cc40542a2d0223fa81a 100644 (file)
@@ -513,13 +513,13 @@ publication_translate_columns(Relation targetrel, List *columns,
                if (!AttrNumberIsForUserDefinedAttr(attnum))
                        ereport(ERROR,
                                        errcode(ERRCODE_INVALID_COLUMN_REFERENCE),
-                                       errmsg("cannot reference system column \"%s\" in publication column list",
+                                       errmsg("cannot use system column \"%s\" in publication column list",
                                                   colname));
 
                if (TupleDescAttr(tupdesc, attnum - 1)->attgenerated)
                        ereport(ERROR,
                                        errcode(ERRCODE_INVALID_COLUMN_REFERENCE),
-                                       errmsg("cannot reference generated column \"%s\" in publication column list",
+                                       errmsg("cannot use generated column \"%s\" in publication column list",
                                                   colname));
 
                if (bms_is_member(attnum, set))
index e0753c1badcc299e2bac45f3bdd2f23f59d70cbc..96b46cbc020ef8b85b6d54d3d4ca8ad116277832 100644 (file)
@@ -992,7 +992,7 @@ createdb(ParseState *pstate, const CreatedbStmt *stmt)
                else
                        ereport(ERROR,
                                        (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                                        errmsg("invalid create database strategy %s", strategy),
+                                        errmsg("invalid create database strategy \"%s\"", strategy),
                                         errhint("Valid strategies are \"wal_log\", and \"file_copy\".")));
        }
 
index 7ffad096aa1420f41ede236c72662f953e1201ef..99011eec9fae951f3f0593fcf2074ebe24e2c145 100644 (file)
@@ -575,7 +575,7 @@ check_simple_rowfilter_expr_walker(Node *node, ParseState *pstate)
                        /* OK, supported */
                        break;
                default:
-                       errdetail_msg = _("Expressions only allow columns, constants, built-in operators, built-in data types, built-in collations, and immutable built-in functions.");
+                       errdetail_msg = _("Only columns, constants, built-in operators, built-in data types, built-in collations, and immutable built-in functions are allowed.");
                        break;
        }
 
@@ -1359,7 +1359,7 @@ CheckAlterPublication(AlterPublicationStmt *stmt, HeapTuple tup,
                                (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
                                 errmsg("publication \"%s\" is defined as FOR ALL TABLES",
                                                NameStr(pubform->pubname)),
-                                errdetail("Tables from schema cannot be added to, dropped from, or set on FOR ALL TABLES publications.")));
+                                errdetail("Schemas cannot be added to or dropped from FOR ALL TABLES publications.")));
 
        /* Check that user is allowed to manipulate the publication tables. */
        if (tables && pubform->puballtables)
index d042abe341412a3e0c1f530288e47de011f20305..f3bfcca434cd5a6d46d69cc94ae77962cf0dde76 100644 (file)
@@ -461,10 +461,8 @@ check_publications(WalReceiverConn *wrconn, List *publications)
 
        if (res->status != WALRCV_OK_TUPLES)
                ereport(ERROR,
-                               errmsg_plural("could not receive publication from the publisher: %s",
-                                                         "could not receive list of publications from the publisher: %s",
-                                                         list_length(publications),
-                                                         res->err));
+                               errmsg("could not receive list of publications from the publisher: %s",
+                                          res->err));
 
        publicationsCopy = list_copy(publications);
 
index 6f5a5262c7373b585db3e62eb34a714281a8efc9..0ec8d84a1b54370944ecc792891469095b735581 100644 (file)
@@ -1532,7 +1532,7 @@ renametrig(RenameStmt *stmt)
                        ereport(ERROR,
                                        errmsg("cannot rename trigger \"%s\" on table \"%s\"",
                                                   stmt->subname, RelationGetRelationName(targetrel)),
-                                       errhint("Rename trigger on partitioned table \"%s\" instead.",
+                                       errhint("Rename the trigger on the partitioned table \"%s\" instead.",
                                                        get_rel_name(get_partition_parent(relid, false))));
 
 
index deda32150288c961e42e2dce1517d83dade7dcfa..775960827d01379a9f2cb8921a242b670e597e39 100644 (file)
@@ -2082,10 +2082,10 @@ ExecCrossPartitionUpdateForeignKey(ModifyTableContext *context,
                        ereport(ERROR,
                                        (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
                                         errmsg("cannot move tuple across partitions when a non-root ancestor of the source partition is directly referenced in a foreign key"),
-                                        errdetail("A foreign key points to ancestor \"%s\", but not the root ancestor \"%s\".",
+                                        errdetail("A foreign key points to ancestor \"%s\" but not the root ancestor \"%s\".",
                                                           RelationGetRelationName(rInfo->ri_RelationDesc),
                                                           RelationGetRelationName(rootRelInfo->ri_RelationDesc)),
-                                        errhint("Consider defining the foreign key on \"%s\".",
+                                        errhint("Consider defining the foreign key on table \"%s\".",
                                                         RelationGetRelationName(rootRelInfo->ri_RelationDesc))));
        }
 
index 6ce361707d767110eecbd6340cfb10db635838b5..3868cd7bd353acdd649804a0135dbdf8ed19bf04 100644 (file)
@@ -851,7 +851,7 @@ LoadArchiveLibrary(void)
 
        if (archive_init == NULL)
                ereport(ERROR,
-                               (errmsg("archive modules have to declare the _PG_archive_module_init symbol")));
+                               (errmsg("archive modules have to define the symbol %s", "_PG_archive_module_init")));
 
        (*archive_init) (&ArchiveContext);
 
index 8eff69c7decd588778b070fa344043d9102d3149..9e52fc401cce22b121d72532aa03ef1732903b17 100644 (file)
@@ -1361,7 +1361,7 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos)
        if (check_enable_rls(RelationGetRelid(rel), InvalidOid, false) == RLS_ENABLED)
                ereport(ERROR,
                                (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                                errmsg("\"%s\" cannot replicate into relation with row-level security enabled: \"%s\"",
+                                errmsg("user \"%s\" cannot replicate into relation with row-level security enabled: \"%s\"",
                                                GetUserNameFromId(GetUserId(), true),
                                                RelationGetRelationName(rel))));
 
index 56f753d987d9656d1e2c7c591d1e2a24c686379b..207a5805ba7d866dc582d9930204344182210510 100644 (file)
@@ -1632,7 +1632,7 @@ TargetPrivilegesCheck(Relation rel, AclMode mode)
        if (check_enable_rls(relid, InvalidOid, false) == RLS_ENABLED)
                ereport(ERROR,
                                (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                                errmsg("\"%s\" cannot replicate into relation with row-level security enabled: \"%s\"",
+                                errmsg("user \"%s\" cannot replicate into relation with row-level security enabled: \"%s\"",
                                                GetUserNameFromId(GetUserId(), true),
                                                RelationGetRelationName(rel))));
 }
@@ -3791,7 +3791,7 @@ ApplyWorkerMain(Datum main_arg)
                }
 
                ereport(DEBUG1,
-                               (errmsg("logical replication apply worker for subscription \"%s\" two_phase is %s",
+                               (errmsg_internal("logical replication apply worker for subscription \"%s\" two_phase is %s",
                                                MySubscription->name,
                                                MySubscription->twophasestate == LOGICALREP_TWOPHASE_STATE_DISABLED ? "DISABLED" :
                                                MySubscription->twophasestate == LOGICALREP_TWOPHASE_STATE_PENDING ? "PENDING" :
@@ -3840,7 +3840,7 @@ DisableSubscriptionAndExit(void)
 
        /* Notify the subscription has been disabled and exit */
        ereport(LOG,
-                       errmsg("logical replication subscription \"%s\" has been disabled due to an error",
+                       errmsg("subscription \"%s\" has been disabled because of an error",
                                   MySubscription->name));
 
        proc_exit(0);
@@ -3975,7 +3975,7 @@ clear_subscription_skip_lsn(XLogRecPtr finish_lsn)
 
                if (myskiplsn != finish_lsn)
                        ereport(WARNING,
-                                       errmsg("skip-LSN of logical replication subscription \"%s\" cleared", MySubscription->name),
+                                       errmsg("skip-LSN of subscription \"%s\" cleared", MySubscription->name),
                                        errdetail("Remote transaction's finish WAL location (LSN) %X/%X did not match skip-LSN %X/%X.",
                                                          LSN_FORMAT_ARGS(finish_lsn),
                                                          LSN_FORMAT_ARGS(myskiplsn)));
@@ -4002,23 +4002,23 @@ apply_error_callback(void *arg)
        if (errarg->rel == NULL)
        {
                if (!TransactionIdIsValid(errarg->remote_xid))
-                       errcontext("processing remote data for replication origin \"%s\" during \"%s\"",
+                       errcontext("processing remote data for replication origin \"%s\" during message type \"%s\"",
                                           errarg->origin_name,
                                           logicalrep_message_type(errarg->command));
                else if (XLogRecPtrIsInvalid(errarg->finish_lsn))
-                       errcontext("processing remote data for replication origin \"%s\" during \"%s\" in transaction %u",
+                       errcontext("processing remote data for replication origin \"%s\" during message type \"%s\" in transaction %u",
                                           errarg->origin_name,
                                           logicalrep_message_type(errarg->command),
                                           errarg->remote_xid);
                else
-                       errcontext("processing remote data for replication origin \"%s\" during \"%s\" in transaction %u finished at %X/%X",
+                       errcontext("processing remote data for replication origin \"%s\" during message type \"%s\" in transaction %u, finished at %X/%X",
                                           errarg->origin_name,
                                           logicalrep_message_type(errarg->command),
                                           errarg->remote_xid,
                                           LSN_FORMAT_ARGS(errarg->finish_lsn));
        }
        else if (errarg->remote_attnum < 0)
-               errcontext("processing remote data for replication origin \"%s\" during \"%s\" for replication target relation \"%s.%s\" in transaction %u finished at %X/%X",
+               errcontext("processing remote data for replication origin \"%s\" during message type \"%s\" for replication target relation \"%s.%s\" in transaction %u, finished at %X/%X",
                                   errarg->origin_name,
                                   logicalrep_message_type(errarg->command),
                                   errarg->rel->remoterel.nspname,
@@ -4026,7 +4026,7 @@ apply_error_callback(void *arg)
                                   errarg->remote_xid,
                                   LSN_FORMAT_ARGS(errarg->finish_lsn));
        else
-               errcontext("processing remote data for replication origin \"%s\" during \"%s\" for replication target relation \"%s.%s\" column \"%s\" in transaction %u finished at %X/%X",
+               errcontext("processing remote data for replication origin \"%s\" during message type \"%s\" for replication target relation \"%s.%s\" column \"%s\" in transaction %u, finished at %X/%X",
                                   errarg->origin_name,
                                   logicalrep_message_type(errarg->command),
                                   errarg->rel->remoterel.nspname,
index 724010dbd97dbfcae507593a519692ecfe4ccc26..e9ba500a15fe950359348de0929b9d467ffe178c 100644 (file)
@@ -516,9 +516,8 @@ ReadReplicationSlot(ReadReplicationSlotCmd *cmd)
                if (OidIsValid(slot_contents.data.database))
                        ereport(ERROR,
                                        errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                                       errmsg("cannot use \"%s\" with logical replication slot \"%s\"",
-                                                  "READ_REPLICATION_SLOT",
-                                                  NameStr(slot_contents.data.name)));
+                                       errmsg("cannot use %s with a logical replication slot",
+                                                  "READ_REPLICATION_SLOT"));
 
                /* slot type */
                values[i] = CStringGetTextDatum("physical");
index 9e3b643a2cd6b080614bfd38ec4ababdf91a7294..609f0b1ad86b39198278ac9e9f27dfb18db3329f 100644 (file)
@@ -425,7 +425,7 @@ pgstat_discard_stats(void)
        {
                ereport(DEBUG2,
                                (errcode_for_file_access(),
-                                errmsg("unlinked permanent statistics file \"%s\"",
+                                errmsg_internal("unlinked permanent statistics file \"%s\"",
                                                PGSTAT_STAT_PERMANENT_FILENAME)));
        }
 
index 82eb59af834dee267defd36f5c467634fe32428e..d6f660edf7b1729fe22f0672ed3d5607acc45b5f 100644 (file)
@@ -368,7 +368,7 @@ pgstat_create_transactional(PgStat_Kind kind, Oid dboid, Oid objoid)
        if (pgstat_get_entry_ref(kind, dboid, objoid, false, NULL))
        {
                ereport(WARNING,
-                               errmsg("resetting existing stats for type %s, db=%u, oid=%u",
+                               errmsg("resetting existing statistics for kind %s, db=%u, oid=%u",
                                           (pgstat_get_kind_info(kind))->name, dboid, objoid));
 
                pgstat_reset(kind, dboid, objoid);
index 876d20611b6f9c4b2cdb331f65e6a94c058f4335..7d17f8b33ebccfdf7833b5102dcd4e250889072d 100644 (file)
@@ -1108,8 +1108,9 @@ CreateBackupStreamer(char *archive_name, char *spclocation,
         */
        if (inject_manifest && is_compressed_tar)
        {
-               pg_log_error("cannot inject manifest into a compressed tarfile");
-               pg_log_info("use client-side compression, send the output to a directory rather than standard output, or use --no-manifest");
+               pg_log_error("cannot inject manifest into a compressed tar file");
+               pg_log_error_hint("Use client-side compression, send the output to a directory rather than standard output, or use %s.",
+                                                 "--no-manifest");
                exit(1);
        }
 
@@ -1124,7 +1125,7 @@ CreateBackupStreamer(char *archive_name, char *spclocation,
        /* At present, we only know how to parse tar archives. */
        if (must_parse_archive && !is_tar && !is_compressed_tar)
        {
-               pg_log_error("unable to parse archive: %s", archive_name);
+               pg_log_error("cannot parse archive \"%s\"", archive_name);
                pg_log_error_detail("Only tar archives can be parsed.");
                if (format == 'p')
                        pg_log_error_detail("Plain format requires pg_basebackup to parse the archive.");
@@ -1342,7 +1343,7 @@ ReceiveArchiveStreamChunk(size_t r, char *copybuf, void *callback_data)
                                /* Sanity check. */
                                if (state->manifest_buffer != NULL ||
                                        state->manifest_file !=NULL)
-                                       pg_fatal("archives should precede manifest");
+                                       pg_fatal("archives must precede manifest");
 
                                /* Parse the rest of the CopyData message. */
                                archive_name = GetCopyDataString(r, copybuf, &cursor);
@@ -1788,7 +1789,7 @@ BaseBackup(char *compression_algorithm, char *compression_detail,
                 * Error message already written in CheckServerVersionForStreaming(),
                 * but add a hint about using -X none.
                 */
-               pg_log_info("HINT: use -X none or -X fetch to disable log streaming");
+               pg_log_error_hint("Use -X none or -X fetch to disable log streaming.");
                exit(1);
        }
 
@@ -1900,7 +1901,7 @@ BaseBackup(char *compression_algorithm, char *compression_detail,
 
        if (showprogress && !verbose)
        {
-               fprintf(stderr, "waiting for checkpoint");
+               fprintf(stderr, _("waiting for checkpoint"));
                if (isatty(fileno(stderr)))
                        fprintf(stderr, "\r");
                else
@@ -2541,7 +2542,7 @@ main(int argc, char **argv)
                char       *error_detail;
 
                if (!parse_compress_algorithm(compression_algorithm, &alg))
-                       pg_fatal("unrecognized compression algorithm \"%s\"",
+                       pg_fatal("unrecognized compression algorithm: \"%s\"",
                                         compression_algorithm);
 
                parse_compress_specification(alg, compression_detail, &client_compress);
index f98ec557db2cf7e0bce0f70a185f02f8d6955c16..63207ca025e0240c4ade63e9c836d5fa72cc5a16 100644 (file)
@@ -511,10 +511,8 @@ FindStreamingStart(uint32 *tli)
                                continue;
                        }
 #else
-                       pg_log_error("could not check file \"%s\"",
-                                                dirent->d_name);
-                       pg_log_error_detail("This build does not support compression with %s.",
-                                                               "LZ4");
+                       pg_log_error("cannot check file \"%s\": compression with %s not supported by this build",
+                                                dirent->d_name, "LZ4");
                        exit(1);
 #endif
                }
@@ -863,7 +861,7 @@ main(int argc, char **argv)
         */
        if (!parse_compress_algorithm(compression_algorithm_str,
                                                                  &compression_algorithm))
-               pg_fatal("unrecognized compression algorithm \"%s\"",
+               pg_fatal("unrecognized compression algorithm: \"%s\"",
                                 compression_algorithm_str);
 
        parse_compress_specification(compression_algorithm, compression_detail,
index 919ec9c29c2d599cc7c6511e1de28f1b346e580a..4ccb90c197e1091bb1f1ec68e637fd5b858b0e21 100644 (file)
@@ -519,7 +519,7 @@ GetSlotInformation(PGconn *conn, const char *slot_name,
         */
        if (PQgetisnull(res, 0, 0))
        {
-               pg_log_error("could not find replication slot \"%s\"", slot_name);
+               pg_log_error("replication slot \"%s\" does not exist", slot_name);
                PQclear(res);
                return false;
        }
index f03f43d66837fd2aaa41f30278d0e420a6628901..bcc3dd5f0b247964ee1893decca34352b12966ba 100644 (file)
@@ -44,7 +44,7 @@ $node->command_fails_like(
        'failure if method "none" specified with compression level');
 $node->command_fails_like(
        [ 'pg_basebackup', '-D', "$tempdir/backup", '--compress', 'none+' ],
-       qr/\Qunrecognized compression algorithm "none+"/,
+       qr/\Qunrecognized compression algorithm: "none+"/,
        'failure on incorrect separator to define compression level');
 
 # Some Windows ANSI code pages may reject this filename, in which case we
@@ -97,7 +97,7 @@ SKIP:
        my @compression_failure_tests = (
                [
                        'extrasquishy',
-                       'unrecognized compression algorithm "extrasquishy"',
+                       'unrecognized compression algorithm: "extrasquishy"',
                        'failure on invalid compression algorithm'
                ],
                [
@@ -107,7 +107,7 @@ SKIP:
                ],
                [
                        'gzip:thunk',
-                       'invalid compression specification: unknown compression option "thunk"',
+                       'invalid compression specification: unrecognized compression option: "thunk"',
                        'failure on unknown compression option'
                ],
                [
index 4f07bb890780a60b3dee026e2e23dde95a10c460..985e68eff1b4375b3e3ce147bbc7563854d25bd3 100644 (file)
@@ -251,7 +251,7 @@ $primary->command_fails_like(
                'nonexistentslot', '-n', '--no-sync', '--verbose',
                '--endpos',        $nextlsn
        ],
-       qr/pg_receivewal: error: could not find replication slot "nonexistentslot"/,
+       qr/pg_receivewal: error: replication slot "nonexistentslot" does not exist/,
        'pg_receivewal fails with non-existing slot');
 $primary->command_ok(
        [
index 8ed8628db11c1410db4987f11250535bfb1aa008..2e712f4fe921a9463b5f92ddf73ed0a244568ff9 100644 (file)
@@ -143,7 +143,7 @@ $node->command_checks_all(
        1,
        [qr/^$/],
        [
-               qr/^createdb: error: database creation failed: ERROR:  invalid create database strategy foo/s
+               qr/^createdb: error: database creation failed: ERROR:  invalid create database strategy "foo"/s
        ],
        'createdb with incorrect --strategy');
 
index 0c6bb9177b9e1ab3c1427cd32d0322198ac37fd8..df5b627834d5d8294dcd83ab39541fdaa5ff32ad 100644 (file)
@@ -234,7 +234,7 @@ parse_compress_specification(pg_compress_algorithm algorithm, char *specificatio
                }
                else
                        result->parse_error =
-                               psprintf(_("unknown compression option \"%s\""), keyword);
+                               psprintf(_("unrecognized compression option: \"%s\""), keyword);
 
                /* Release memory, just to be tidy. */
                pfree(keyword);
index 0cd0467fbb83872ce086db3838b66e1cf1b25390..a9edd8ccfca6319633b45fce44a41158e74feedd 100644 (file)
@@ -45,7 +45,7 @@ ok( $stderr =~
        replication => 'database');
 like(
        $stderr,
-       qr/cannot use "READ_REPLICATION_SLOT" with logical replication slot "test_slot"/,
+       qr/cannot use READ_REPLICATION_SLOT with a logical replication slot/,
        'READ_REPLICATION_SLOT not supported for logical slots');
 
 # Check case of walsender not using a database connection.  Logical
index f9092d5929f01d27b5f9b4b8b83c806073043de3..8bb3e58494c8e6ffa776c139945ac8f9a86319fb 100644 (file)
@@ -2761,8 +2761,8 @@ DELETE FROM fkpart11.fk WHERE a = 4;
 ALTER TABLE fkpart11.fk ADD CONSTRAINT fkey FOREIGN KEY (a) REFERENCES fkpart11.pk1 (a) ON UPDATE CASCADE ON DELETE CASCADE;
 UPDATE fkpart11.pk SET a = a - 1;
 ERROR:  cannot move tuple across partitions when a non-root ancestor of the source partition is directly referenced in a foreign key
-DETAIL:  A foreign key points to ancestor "pk1", but not the root ancestor "pk".
-HINT:  Consider defining the foreign key on "pk".
+DETAIL:  A foreign key points to ancestor "pk1" but not the root ancestor "pk".
+HINT:  Consider defining the foreign key on table "pk".
 -- it's okay though if the non-leaf partition is updated directly
 UPDATE fkpart11.pk1 SET a = a - 1;
 SELECT tableoid::pg_catalog.regclass, * FROM fkpart11.pk;
index c0c0e7d92e01953c0ad45fc0d51bab7437fb82a6..bfce1e1bc099fc0f9ec5b631a73222cefac3aaf9 100644 (file)
@@ -72,15 +72,15 @@ DETAIL:  Tables cannot be added to or dropped from FOR ALL TABLES publications.
 -- fail - can't add schema to 'FOR ALL TABLES' publication
 ALTER PUBLICATION testpub_foralltables ADD TABLES IN SCHEMA pub_test;
 ERROR:  publication "testpub_foralltables" is defined as FOR ALL TABLES
-DETAIL:  Tables from schema cannot be added to, dropped from, or set on FOR ALL TABLES publications.
+DETAIL:  Schemas cannot be added to or dropped from FOR ALL TABLES publications.
 -- fail - can't drop schema from 'FOR ALL TABLES' publication
 ALTER PUBLICATION testpub_foralltables DROP TABLES IN SCHEMA pub_test;
 ERROR:  publication "testpub_foralltables" is defined as FOR ALL TABLES
-DETAIL:  Tables from schema cannot be added to, dropped from, or set on FOR ALL TABLES publications.
+DETAIL:  Schemas cannot be added to or dropped from FOR ALL TABLES publications.
 -- fail - can't set schema to 'FOR ALL TABLES' publication
 ALTER PUBLICATION testpub_foralltables SET TABLES IN SCHEMA pub_test;
 ERROR:  publication "testpub_foralltables" is defined as FOR ALL TABLES
-DETAIL:  Tables from schema cannot be added to, dropped from, or set on FOR ALL TABLES publications.
+DETAIL:  Schemas cannot be added to or dropped from FOR ALL TABLES publications.
 SET client_min_messages = 'ERROR';
 CREATE PUBLICATION testpub_fortable FOR TABLE testpub_tbl1;
 RESET client_min_messages;
@@ -470,7 +470,7 @@ CREATE PUBLICATION testpub6 FOR TABLE testpub_rf_tbl1 WHERE (a IN (SELECT genera
 ERROR:  invalid publication WHERE expression
 LINE 1: ...ICATION testpub6 FOR TABLE testpub_rf_tbl1 WHERE (a IN (SELE...
                                                              ^
-DETAIL:  Expressions only allow columns, constants, built-in operators, built-in data types, built-in collations, and immutable built-in functions.
+DETAIL:  Only columns, constants, built-in operators, built-in data types, built-in collations, and immutable built-in functions are allowed.
 -- fail - system columns are not allowed
 CREATE PUBLICATION testpub6 FOR TABLE testpub_rf_tbl1 WHERE ('(0,1)'::tid = ctid);
 ERROR:  invalid publication WHERE expression
@@ -680,10 +680,10 @@ DETAIL:  Column list used by the publication does not cover the replica identity
 ALTER PUBLICATION testpub_fortable DROP TABLE testpub_tbl5;
 -- error: generated column "d" can't be in list
 ALTER PUBLICATION testpub_fortable ADD TABLE testpub_tbl5 (a, d);
-ERROR:  cannot reference generated column "d" in publication column list
+ERROR:  cannot use generated column "d" in publication column list
 -- error: system attributes "ctid" not allowed in column list
 ALTER PUBLICATION testpub_fortable ADD TABLE testpub_tbl5 (a, ctid);
-ERROR:  cannot reference system column "ctid" in publication column list
+ERROR:  cannot use system column "ctid" in publication column list
 -- ok
 ALTER PUBLICATION testpub_fortable ADD TABLE testpub_tbl5 (a, c);
 ALTER TABLE testpub_tbl5 DROP COLUMN c;                -- no dice
index 8fe42ec5604da42b324f7fd7316391b3b3dc70b2..641f5e67c47541c3b007c4d6582f2162d9533b62 100644 (file)
@@ -3546,7 +3546,7 @@ LINE 1: alter trigger a on only grandparent rename to b;
                            ^
 alter trigger b on middle rename to c; -- can't rename trigger on partition
 ERROR:  cannot rename trigger "b" on table "middle"
-HINT:  Rename trigger on partitioned table "grandparent" instead.
+HINT:  Rename the trigger on the partitioned table "grandparent" instead.
 create trigger c after insert on middle
 for each row execute procedure f();
 alter trigger b on grandparent rename to c;
index f9f6117dfb49a5e7f6c8b7c11f2000d5ec6acf2c..8614bf0458c1888be7f31c402e60a4d223fc0593 100644 (file)
@@ -260,7 +260,7 @@ expect_failure(
        2,
        11,
        13,
-       qr/ERROR: ( [A-Z0-9]+:)? "regress_admin" cannot replicate into relation with row-level security enabled: "unpartitioned\w*"/msi,
+       qr/ERROR: ( [A-Z0-9]+:)? user "regress_admin" cannot replicate into relation with row-level security enabled: "unpartitioned\w*"/msi,
        "non-superuser admin fails to replicate insert into rls enabled table");
 grant_superuser("regress_admin");
 expect_replication("alice.unpartitioned", 3, 11, 15,
@@ -274,7 +274,7 @@ expect_failure(
        3,
        11,
        15,
-       qr/ERROR: ( [A-Z0-9]+:)? "regress_admin" cannot replicate into relation with row-level security enabled: "unpartitioned\w*"/msi,
+       qr/ERROR: ( [A-Z0-9]+:)? user "regress_admin" cannot replicate into relation with row-level security enabled: "unpartitioned\w*"/msi,
        "non-superuser admin fails to replicate update into rls enabled unpartitioned"
 );
 
@@ -289,7 +289,7 @@ expect_failure(
        3,
        13,
        17,
-       qr/ERROR: ( [A-Z0-9]+:)? "regress_admin" cannot replicate into relation with row-level security enabled: "unpartitioned\w*"/msi,
+       qr/ERROR: ( [A-Z0-9]+:)? user "regress_admin" cannot replicate into relation with row-level security enabled: "unpartitioned\w*"/msi,
        "non-superuser admin without bypassrls fails to replicate delete into rls enabled unpartitioned"
 );
 grant_bypassrls("regress_admin");
index add8788370c603226f2b976588dc1f18d3d3e2f8..1bd18a62cd80d62aeed07b6bc9a8012a3875e688 100644 (file)
@@ -29,7 +29,7 @@ sub test_skip_lsn
        # Get the finish LSN of the error transaction.
        my $contents = slurp_file($node_subscriber->logfile, $offset);
        $contents =~
-         qr/processing remote data for replication origin \"pg_\d+\" during "INSERT" for replication target relation "public.tbl" in transaction \d+ finished at ([[:xdigit:]]+\/[[:xdigit:]]+)/
+         qr/processing remote data for replication origin \"pg_\d+\" during message type "INSERT" for replication target relation "public.tbl" in transaction \d+, finished at ([[:xdigit:]]+\/[[:xdigit:]]+)/
          or die "could not get error-LSN";
        my $lsn = $1;