Re: Duplicated assignment of slot_name in walsender.c - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Duplicated assignment of slot_name in walsender.c
Date
Msg-id 20151021202125.GA3391@alvherre.pgsql
Whole thread Raw
In response to Re: Duplicated assignment of slot_name in walsender.c  (Euler Taveira <euler@timbira.com.br>)
Responses Re: Duplicated assignment of slot_name in walsender.c  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Euler Taveira wrote:

> It seems that the 2nd assignment was an oversight. Spotted by Bernd
> Helmle.

I think the first assignment is also pointless -- I mean can't we just
use MyReplicationSlot->data.name in both places where slot_name is used?

In the same routine, it seems wasteful to be doing strlen() twice for
every string sent over the wire.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Freezing without cleanup lock
Next
From: Andres Freund
Date:
Subject: Re: Duplicated assignment of slot_name in walsender.c