Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6e8a031

Browse files
committed
pg_createsubscriber: Message style improvements
1 parentff59d5d commit6e8a031

File tree

2 files changed

+30
-29
lines changed

2 files changed

+30
-29
lines changed

‎doc/src/sgml/ref/pg_createsubscriber.sgml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ PostgreSQL documentation
8888
<term><option>--database=<replaceable class="parameter">dbname</replaceable></option></term>
8989
<listitem>
9090
<para>
91-
The database name to create the subscription. Multiple databases can
92-
be selected by writing multiple <option>-d</option> switches.
91+
The name of the database in which to create a subscription. Multiple
92+
databases can be selected by writing multiple <option>-d</option>
93+
switches.
9394
</para>
9495
</listitem>
9596
</varlistentry>

‎src/bin/pg_basebackup/pg_createsubscriber.c

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,13 @@ cleanup_objects_atexit(void)
195195
*/
196196
if (dbinfo[i].made_publication)
197197
{
198-
pg_log_warning("publication \"%s\" in database \"%s\" on primarymight be left behind",
198+
pg_log_warning("publication \"%s\"createdin database \"%s\" on primarywas left behind",
199199
dbinfo[i].pubname,dbinfo[i].dbname);
200-
pg_log_warning_hint("Consider dropping this publication before trying again.");
200+
pg_log_warning_hint("Drop this publication before trying again.");
201201
}
202202
if (dbinfo[i].made_replslot)
203203
{
204-
pg_log_warning("replication slot \"%s\" in database \"%s\" on primarymight be left behind",
204+
pg_log_warning("replication slot \"%s\"createdin database \"%s\" on primarywas left behind",
205205
dbinfo[i].replslotname,dbinfo[i].dbname);
206206
pg_log_warning_hint("Drop this replication slot soon to avoid retention of WAL files.");
207207
}
@@ -221,14 +221,14 @@ usage(void)
221221
printf(_("Usage:\n"));
222222
printf(_(" %s [OPTION]...\n"),progname);
223223
printf(_("\nOptions:\n"));
224-
printf(_(" -d, --database=DBNAME database to create a subscription\n"));
224+
printf(_(" -d, --database=DBNAME databasein whichto create a subscription\n"));
225225
printf(_(" -D, --pgdata=DATADIR location for the subscriber data directory\n"));
226226
printf(_(" -n, --dry-run dry run, just show what would be done\n"));
227227
printf(_(" -p, --subscriber-port=PORT subscriber port number (default %s)\n"),DEFAULT_SUB_PORT);
228228
printf(_(" -P, --publisher-server=CONNSTR publisher connection string\n"));
229229
printf(_(" -s, --socketdir=DIR socket directory to use (default current dir.)\n"));
230230
printf(_(" -t, --recovery-timeout=SECS seconds to wait for recovery to end\n"));
231-
printf(_(" -U, --subscriber-username=NAME subscriberusername\n"));
231+
printf(_(" -U, --subscriber-username=NAMEuser name forsubscriberconnection\n"));
232232
printf(_(" -v, --verbose output verbose messages\n"));
233233
printf(_(" --config-file=FILENAME use specified main server configuration\n"
234234
" file when running target cluster\n"));
@@ -670,7 +670,7 @@ modify_subscriber_sysid(const struct CreateSubscriberOptions *opt)
670670
if (rc==0)
671671
pg_log_info("subscriber successfully changed the system identifier");
672672
else
673-
pg_fatal("subscriber failed tochange system identifier: exit code: %d",rc);
673+
pg_fatal("could notchange system identifier of subscriber: %s",wait_result_to_str(rc));
674674
}
675675

676676
pg_free(cf);
@@ -926,7 +926,7 @@ check_publisher(const struct LogicalRepInfo *dbinfo)
926926

927927
if (max_walsenders-cur_walsenders<num_dbs)
928928
{
929-
pg_log_error("publisher requires %dwal sender processes, but only %d remain",
929+
pg_log_error("publisher requires %dWAL sender processes, but only %d remain",
930930
num_dbs,max_walsenders-cur_walsenders);
931931
pg_log_error_hint("Increase the configuration parameter \"%s\" to at least %d.",
932932
"max_wal_senders",cur_walsenders+num_dbs);
@@ -935,7 +935,7 @@ check_publisher(const struct LogicalRepInfo *dbinfo)
935935

936936
if (max_prepared_transactions!=0)
937937
{
938-
pg_log_warning("two_phase option will not be enabled for slots");
938+
pg_log_warning("two_phase option will not be enabled forreplicationslots");
939939
pg_log_warning_detail("Subscriptions will be created with the two_phase option disabled. "
940940
"Prepared transactions will be replicated at COMMIT PREPARED.");
941941
}
@@ -1791,7 +1791,7 @@ set_replication_progress(PGconn *conn, const struct LogicalRepInfo *dbinfo, cons
17911791
*/
17921792
originname=psprintf("pg_%u",suboid);
17931793

1794-
pg_log_info("setting the replication progress (node name \"%s\" ; LSN %s) in database \"%s\"",
1794+
pg_log_info("setting the replication progress (node name \"%s\", LSN %s) in database \"%s\"",
17951795
originname,lsnstr,dbinfo->dbname);
17961796

17971797
resetPQExpBuffer(str);
@@ -1806,7 +1806,7 @@ set_replication_progress(PGconn *conn, const struct LogicalRepInfo *dbinfo, cons
18061806
res=PQexec(conn,str->data);
18071807
if (PQresultStatus(res)!=PGRES_TUPLES_OK)
18081808
{
1809-
pg_log_error("could not set replication progress forthesubscription \"%s\": %s",
1809+
pg_log_error("could not set replication progress for subscription \"%s\": %s",
18101810
dbinfo->subname,PQresultErrorMessage(res));
18111811
disconnect_database(conn, true);
18121812
}
@@ -1963,7 +1963,7 @@ main(int argc, char **argv)
19631963
}
19641964
else
19651965
{
1966-
pg_log_error("duplicatedatabase \"%s\"",optarg);
1966+
pg_log_error("database \"%s\" specified more than once",optarg);
19671967
exit(1);
19681968
}
19691969
break;
@@ -2004,7 +2004,7 @@ main(int argc, char **argv)
20042004
}
20052005
else
20062006
{
2007-
pg_log_error("duplicatepublication \"%s\"",optarg);
2007+
pg_log_error("publication \"%s\" specified more than once",optarg);
20082008
exit(1);
20092009
}
20102010
break;
@@ -2016,7 +2016,7 @@ main(int argc, char **argv)
20162016
}
20172017
else
20182018
{
2019-
pg_log_error("duplicatereplication slot \"%s\"",optarg);
2019+
pg_log_error("replication slot \"%s\" specified more than once",optarg);
20202020
exit(1);
20212021
}
20222022
break;
@@ -2028,7 +2028,7 @@ main(int argc, char **argv)
20282028
}
20292029
else
20302030
{
2031-
pg_log_error("duplicatesubscription \"%s\"",optarg);
2031+
pg_log_error("subscription \"%s\" specified more than once",optarg);
20322032
exit(1);
20332033
}
20342034
break;
@@ -2106,7 +2106,7 @@ main(int argc, char **argv)
21062106
simple_string_list_append(&opt.database_names,dbname_conninfo);
21072107
num_dbs++;
21082108

2109-
pg_log_info("database \"%s\" was extracted from the publisher connection string",
2109+
pg_log_info("databasename\"%s\" was extracted from the publisher connection string",
21102110
dbname_conninfo);
21112111
}
21122112
else
@@ -2121,23 +2121,23 @@ main(int argc, char **argv)
21212121
/* Number of object names must match number of databases */
21222122
if (num_pubs>0&&num_pubs!=num_dbs)
21232123
{
2124-
pg_log_error("wrong number of publication names");
2125-
pg_log_error_hint("Numberof publication names (%d) must match number of database names (%d).",
2126-
num_pubs,num_dbs);
2124+
pg_log_error("wrong number of publication names specified");
2125+
pg_log_error_detail("The numberofspecifiedpublication names (%d) must matchthenumber of specified database names (%d).",
2126+
num_pubs,num_dbs);
21272127
exit(1);
21282128
}
21292129
if (num_subs>0&&num_subs!=num_dbs)
21302130
{
2131-
pg_log_error("wrong number of subscription names");
2132-
pg_log_error_hint("Numberof subscription names (%d) must match number of database names (%d).",
2133-
num_subs,num_dbs);
2131+
pg_log_error("wrong number of subscription names specified");
2132+
pg_log_error_detail("The numberofspecifiedsubscription names (%d) must matchthenumber of specified database names (%d).",
2133+
num_subs,num_dbs);
21342134
exit(1);
21352135
}
21362136
if (num_replslots>0&&num_replslots!=num_dbs)
21372137
{
2138-
pg_log_error("wrong number of replication slot names");
2139-
pg_log_error_hint("Numberof replication slot names (%d) must match number of database names (%d).",
2140-
num_replslots,num_dbs);
2138+
pg_log_error("wrong number of replication slot names specified");
2139+
pg_log_error_detail("The numberofspecifiedreplication slot names (%d) must matchthenumber of specified database names (%d).",
2140+
num_replslots,num_dbs);
21412141
exit(1);
21422142
}
21432143

@@ -2178,8 +2178,8 @@ main(int argc, char **argv)
21782178
*/
21792179
if (stat(pidfile,&statbuf)==0)
21802180
{
2181-
pg_log_error("standbyis up and running");
2182-
pg_log_error_hint("Stop the standby and try again.");
2181+
pg_log_error("standbyserver is running");
2182+
pg_log_error_hint("Stop the standbyserverand try again.");
21832183
exit(1);
21842184
}
21852185

@@ -2188,7 +2188,7 @@ main(int argc, char **argv)
21882188
* by command-line options). The goal is to avoid connections during the
21892189
* transformation steps.
21902190
*/
2191-
pg_log_info("starting the standby with command-line options");
2191+
pg_log_info("starting the standbyserverwith command-line options");
21922192
start_standby_server(&opt, true, false);
21932193

21942194
/* Check if the standby server is ready for logical replication */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp