pgsql: Refactor receivelog.c parameters

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Refactor receivelog.c parameters
Date: 2016-03-11 10:16:00
Message-ID: E1aeK6y-0005hF-44@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Refactor receivelog.c parameters

Much cruft had accumulated over time with a large number of parameters
passed down between functions very deep. With this refactoring, instead
introduce a StreamCtl structure that holds the parameters, and pass around
a pointer to this structure instead. This makes it much easier to add or
remove fields that are needed deeper down in the implementation without
having to modify every function header in the file.

Patch by me after much nagging from Andres
Reviewed by Craig Ringer and Daniel Gustafsson

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/38c83c9b7569378d864d8915e291716b8bec15f2

Modified Files
--------------
src/bin/pg_basebackup/pg_basebackup.c | 18 +++-
src/bin/pg_basebackup/pg_receivexlog.c | 34 +++---
src/bin/pg_basebackup/receivelog.c | 187 ++++++++++++++-------------------
src/bin/pg_basebackup/receivelog.h | 33 ++++--
4 files changed, 136 insertions(+), 136 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2016-03-11 12:39:48 pgsql: Fix a typo, and remove unnecessary pgstat_report_wait_end().
Previous Message Simon Riggs 2016-03-11 09:53:57 pgsql: Allow emit_log_hook to see original message text