mirror of
https://github.com/postgres/postgres.git
synced 2025-10-19 15:49:24 +03:00
Remove duplicated log related to slot creation in pg_createsubscriber
The creation of a replication slot done in a specific database on a publisher was logged twice, with the second log not mentioning the database where the slot creation happened. This commit removes the information logged after a slot has been successfully created, moving the information about the publisher from the second to the first log. Note that failing a slot creation is also logged, so there is no loss of information. Author: Peter Smith <smithpb2250@gmail.com> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Discussion: https://postgr.es/m/CAHut+Pv7qDvLbDgc9PQGhULT3rPXTxdu_=w+iW-kMs+zPADR+w@mail.gmail.com
This commit is contained in:
@@ -801,10 +801,7 @@ setup_publisher(struct LogicalRepInfo *dbinfo)
|
|||||||
if (lsn)
|
if (lsn)
|
||||||
pg_free(lsn);
|
pg_free(lsn);
|
||||||
lsn = create_logical_replication_slot(conn, &dbinfo[i]);
|
lsn = create_logical_replication_slot(conn, &dbinfo[i]);
|
||||||
if (lsn != NULL || dry_run)
|
if (lsn == NULL && !dry_run)
|
||||||
pg_log_info("create replication slot \"%s\" on publisher",
|
|
||||||
dbinfo[i].replslotname);
|
|
||||||
else
|
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1375,7 +1372,7 @@ create_logical_replication_slot(PGconn *conn, struct LogicalRepInfo *dbinfo)
|
|||||||
|
|
||||||
Assert(conn != NULL);
|
Assert(conn != NULL);
|
||||||
|
|
||||||
pg_log_info("creating the replication slot \"%s\" in database \"%s\"",
|
pg_log_info("creating the replication slot \"%s\" in database \"%s\" on publisher",
|
||||||
slot_name, dbinfo->dbname);
|
slot_name, dbinfo->dbname);
|
||||||
|
|
||||||
slot_name_esc = PQescapeLiteral(conn, slot_name, strlen(slot_name));
|
slot_name_esc = PQescapeLiteral(conn, slot_name, strlen(slot_name));
|
||||||
|
Reference in New Issue
Block a user