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
if (lsn)
pg_free(lsn);
lsn = create_logical_replication_slot(conn, &dbinfo[i]);
- if (lsn != NULL || dry_run)
- pg_log_info("create replication slot \"%s\" on publisher",
- dbinfo[i].replslotname);
- else
+ if (lsn == NULL && !dry_run)
exit(1);
/*
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_esc = PQescapeLiteral(conn, slot_name, strlen(slot_name));