Duplicated assignment of slot_name in walsender.c

Bernd Helmle <mailings@oopsware.de>

From: Bernd Helmle <mailings@oopsware.de>
To: pgsql-hackers@postgresql.org
Date: 2015-10-20T11:28:58Z
Lists: pgsql-hackers
walsender.c, CreateReplicationSlot() currently has this:

        slot_name = NameStr(MyReplicationSlot->data.name);

        if (cmd->kind == REPLICATION_KIND_LOGICAL)
        {
	[...]
        }
        else if (cmd->kind == REPLICATION_KIND_PHYSICAL && cmd->reserve_wal)
        {
	[...]
        }

        slot_name = NameStr(MyReplicationSlot->data.name);

The 2nd assignment to slot_name looks unnecessary?

-- 
Thanks

	Bernd


Commits

  1. Measure string lengths only once