From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Euler Taveira <euler(at)timbira(dot)com(dot)br>, Bernd Helmle <mailings(at)oopsware(dot)de>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Duplicated assignment of slot_name in walsender.c |
Date: | 2015-10-27 16:27:03 |
Message-ID: | 20151027162703.GF240637@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andres Freund wrote:
> If you want to do that, I'm unenthusiastically not objecting. But if so,
> let's also do it in IdentifySystem(), SendTimeLineHistory(),
> StartReplication(), SendBackupHeader(), SendXLogRecPtResult() - they're
> modeled after each other.
Okay, pushed with that, backpatched to 9.4 which is where it all applied
with no conflicts, to ease future backpatching pain. (Some of this code
exists back in 9.3, but git generated a lot of conflicts in
cherry-picking so I didn't bother).
In SendXLogRecPtrResult() we now rely on snprintf's return value, rather
than doing a separate strlen call. We do have some other places (not a
lot admittedly) in which we rely on snprintf returning correctly. I
assume that's the norm when there's no possibility of failure.
I wonder why we use MAXFNAMELEN to print %X/%X -- that seems odd.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Vladimir Borodin | 2015-10-27 16:45:58 | Replication slots and isolation levels |
Previous Message | Andres Freund | 2015-10-27 14:44:10 | Re: Rework the way multixact truncations work |