Thread: pgsql: Refactor receivelog.c parameters

pgsql: Refactor receivelog.c parameters

From
Magnus Hagander
Date:
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(-)