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

Commit05faf06

Browse files
committed
pg_createsubscriber: Message improvements
Objects are typically "in" a database, not "on".
1 parent88e3da5 commit05faf06

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

‎src/bin/pg_basebackup/pg_createsubscriber.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@ drop_existing_subscriptions(PGconn *conn, const char *subname, const char *dbnam
10541054
subname);
10551055
appendPQExpBuffer(query," DROP SUBSCRIPTION %s;",subname);
10561056

1057-
pg_log_info("dropping subscription \"%s\"on database \"%s\"",
1057+
pg_log_info("dropping subscription \"%s\"in database \"%s\"",
10581058
subname,dbname);
10591059

10601060
if (!dry_run)
@@ -1299,7 +1299,7 @@ create_logical_replication_slot(PGconn *conn, struct LogicalRepInfo *dbinfo)
12991299

13001300
Assert(conn!=NULL);
13011301

1302-
pg_log_info("creating the replication slot \"%s\"on database \"%s\"",
1302+
pg_log_info("creating the replication slot \"%s\"in database \"%s\"",
13031303
slot_name,dbinfo->dbname);
13041304

13051305
slot_name_esc=PQescapeLiteral(conn,slot_name,strlen(slot_name));
@@ -1317,7 +1317,7 @@ create_logical_replication_slot(PGconn *conn, struct LogicalRepInfo *dbinfo)
13171317
res=PQexec(conn,str->data);
13181318
if (PQresultStatus(res)!=PGRES_TUPLES_OK)
13191319
{
1320-
pg_log_error("could not create replication slot \"%s\"on database \"%s\": %s",
1320+
pg_log_error("could not create replication slot \"%s\"in database \"%s\": %s",
13211321
slot_name,dbinfo->dbname,
13221322
PQresultErrorMessage(res));
13231323
PQclear(res);
@@ -1347,7 +1347,7 @@ drop_replication_slot(PGconn *conn, struct LogicalRepInfo *dbinfo,
13471347

13481348
Assert(conn!=NULL);
13491349

1350-
pg_log_info("dropping the replication slot \"%s\"on database \"%s\"",
1350+
pg_log_info("dropping the replication slot \"%s\"in database \"%s\"",
13511351
slot_name,dbinfo->dbname);
13521352

13531353
slot_name_esc=PQescapeLiteral(conn,slot_name,strlen(slot_name));
@@ -1363,7 +1363,7 @@ drop_replication_slot(PGconn *conn, struct LogicalRepInfo *dbinfo,
13631363
res=PQexec(conn,str->data);
13641364
if (PQresultStatus(res)!=PGRES_TUPLES_OK)
13651365
{
1366-
pg_log_error("could not drop replication slot \"%s\"on database \"%s\": %s",
1366+
pg_log_error("could not drop replication slot \"%s\"in database \"%s\": %s",
13671367
slot_name,dbinfo->dbname,PQresultErrorMessage(res));
13681368
dbinfo->made_replslot= false;/* don't try again. */
13691369
}
@@ -1570,7 +1570,7 @@ create_publication(PGconn *conn, struct LogicalRepInfo *dbinfo)
15701570
PQclear(res);
15711571
resetPQExpBuffer(str);
15721572

1573-
pg_log_info("creating publication \"%s\"on database \"%s\"",
1573+
pg_log_info("creating publication \"%s\"in database \"%s\"",
15741574
dbinfo->pubname,dbinfo->dbname);
15751575

15761576
appendPQExpBuffer(str,"CREATE PUBLICATION %s FOR ALL TABLES",
@@ -1583,7 +1583,7 @@ create_publication(PGconn *conn, struct LogicalRepInfo *dbinfo)
15831583
res=PQexec(conn,str->data);
15841584
if (PQresultStatus(res)!=PGRES_COMMAND_OK)
15851585
{
1586-
pg_log_error("could not create publication \"%s\"on database \"%s\": %s",
1586+
pg_log_error("could not create publication \"%s\"in database \"%s\": %s",
15871587
dbinfo->pubname,dbinfo->dbname,PQresultErrorMessage(res));
15881588
disconnect_database(conn, true);
15891589
}
@@ -1612,7 +1612,7 @@ drop_publication(PGconn *conn, struct LogicalRepInfo *dbinfo)
16121612

16131613
pubname_esc=PQescapeIdentifier(conn,dbinfo->pubname,strlen(dbinfo->pubname));
16141614

1615-
pg_log_info("dropping publication \"%s\"on database \"%s\"",
1615+
pg_log_info("dropping publication \"%s\"in database \"%s\"",
16161616
dbinfo->pubname,dbinfo->dbname);
16171617

16181618
appendPQExpBuffer(str,"DROP PUBLICATION %s",pubname_esc);
@@ -1626,7 +1626,7 @@ drop_publication(PGconn *conn, struct LogicalRepInfo *dbinfo)
16261626
res=PQexec(conn,str->data);
16271627
if (PQresultStatus(res)!=PGRES_COMMAND_OK)
16281628
{
1629-
pg_log_error("could not drop publication \"%s\"on database \"%s\": %s",
1629+
pg_log_error("could not drop publication \"%s\"in database \"%s\": %s",
16301630
dbinfo->pubname,dbinfo->dbname,PQresultErrorMessage(res));
16311631
dbinfo->made_publication= false;/* don't try again. */
16321632

@@ -1672,7 +1672,7 @@ create_subscription(PGconn *conn, const struct LogicalRepInfo *dbinfo)
16721672
pubconninfo_esc=PQescapeLiteral(conn,dbinfo->pubconninfo,strlen(dbinfo->pubconninfo));
16731673
replslotname_esc=PQescapeLiteral(conn,dbinfo->replslotname,strlen(dbinfo->replslotname));
16741674

1675-
pg_log_info("creating subscription \"%s\"on database \"%s\"",
1675+
pg_log_info("creating subscription \"%s\"in database \"%s\"",
16761676
dbinfo->subname,dbinfo->dbname);
16771677

16781678
appendPQExpBuffer(str,
@@ -1693,7 +1693,7 @@ create_subscription(PGconn *conn, const struct LogicalRepInfo *dbinfo)
16931693
res=PQexec(conn,str->data);
16941694
if (PQresultStatus(res)!=PGRES_COMMAND_OK)
16951695
{
1696-
pg_log_error("could not create subscription \"%s\"on database \"%s\": %s",
1696+
pg_log_error("could not create subscription \"%s\"in database \"%s\": %s",
16971697
dbinfo->subname,dbinfo->dbname,PQresultErrorMessage(res));
16981698
disconnect_database(conn, true);
16991699
}
@@ -1769,7 +1769,7 @@ set_replication_progress(PGconn *conn, const struct LogicalRepInfo *dbinfo, cons
17691769
*/
17701770
originname=psprintf("pg_%u",suboid);
17711771

1772-
pg_log_info("setting the replication progress (node name \"%s\" ; LSN %s)on database \"%s\"",
1772+
pg_log_info("setting the replication progress (node name \"%s\" ; LSN %s)in database \"%s\"",
17731773
originname,lsnstr,dbinfo->dbname);
17741774

17751775
resetPQExpBuffer(str);
@@ -1815,7 +1815,7 @@ enable_subscription(PGconn *conn, const struct LogicalRepInfo *dbinfo)
18151815

18161816
subname=PQescapeIdentifier(conn,dbinfo->subname,strlen(dbinfo->subname));
18171817

1818-
pg_log_info("enabling subscription \"%s\"on database \"%s\"",
1818+
pg_log_info("enabling subscription \"%s\"in database \"%s\"",
18191819
dbinfo->subname,dbinfo->dbname);
18201820

18211821
appendPQExpBuffer(str,"ALTER SUBSCRIPTION %s ENABLE",subname);

‎src/bin/pg_basebackup/t/040_pg_createsubscriber.pl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,16 +414,16 @@ sub generate_db
414414
);
415415
is($result,qq(0),'failover slot was removed');
416416

417-
# Check resulton database $db1
417+
# Check resultin database $db1
418418
$result =$node_s->safe_psql($db1,'SELECT * FROM tbl1');
419419
is($result,qq(first row
420420
second row
421421
third row),
422-
"logical replication workson database$db1");
422+
"logical replication worksin database$db1");
423423

424-
# Check resulton database $db2
424+
# Check resultin database $db2
425425
$result =$node_s->safe_psql($db2,'SELECT * FROM tbl2');
426-
is($result,qq(row 1),"logical replication workson database$db2");
426+
is($result,qq(row 1),"logical replication worksin database$db2");
427427

428428
# Different system identifier?
429429
my$sysid_p =$node_p->safe_psql('postgres',

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp