On 2014-10-01 11:21:12 -0300, Alvaro Herrera wrote: > Andres Freund wrote: > > > From d667f7a63cd62733d88ec5b7228dfd5d7136b9d7 Mon Sep 17 00:00:00 2001 > > From: Michael Paquier <mich...@otacoo.com> > > Date: Mon, 1 Sep 2014 20:48:43 +0900 > > Subject: [PATCH 3/4] Refactoring of pg_basebackup utilities > > > > Code duplication is reduced with the introduction of new APIs for each > > individual replication command: > > - IDENTIFY_SYSTEM > > - CREATE_REPLICATION_SLOT > > - DROP_REPLICATION_SLOT > > A couple of variables used to identify a timeline ID are changed as well > > to be more consistent with core code. > > --- > > src/bin/pg_basebackup/pg_basebackup.c | 21 +---- > > src/bin/pg_basebackup/pg_receivexlog.c | 38 ++------ > > src/bin/pg_basebackup/pg_recvlogical.c | 116 ++++++------------------ > > src/bin/pg_basebackup/streamutil.c | 159 > > +++++++++++++++++++++++++++++++++ > > src/bin/pg_basebackup/streamutil.h | 10 +++ > > 5 files changed, 207 insertions(+), 137 deletions(-) > > Not objecting to any of this, but isn't it a bit funny that a patch that > aims to reduce duplication ends up with more lines than there were > originally?
The reduction is there in combination with a later patch - which needs most of the code moved to streamutil.c. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers