]> granicus.if.org Git - postgresql/commit
Refactor receivelog.c parameters
authorMagnus Hagander <magnus@hagander.net>
Fri, 11 Mar 2016 10:08:01 +0000 (11:08 +0100)
committerMagnus Hagander <magnus@hagander.net>
Fri, 11 Mar 2016 10:15:12 +0000 (11:15 +0100)
commit38c83c9b7569378d864d8915e291716b8bec15f2
tree1bd74adad635b071024708f90d591074bf125ec0
parent73e7e49da3b23a15cd84f003e11ad7d55ad80da7
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
src/bin/pg_basebackup/pg_basebackup.c
src/bin/pg_basebackup/pg_receivexlog.c
src/bin/pg_basebackup/receivelog.c
src/bin/pg_basebackup/receivelog.h