Refectoring of receivelog.c

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Refectoring of receivelog.c
Date: 2016-02-14 20:48:07
Message-ID: CABUevExgEQrkMPsWdrEFy8zqUYNnKWxDJAWcEXSGNf1uurrjmw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I was working on adding the tar streaming functionality we talked about at
the developer meeting to pg_basebackup, and rapidly ran across the issue
that Andres has been complaining about for a while. The code in
receivelog.c just passes an insane number of parameters around. Adding or
changing even a small thing ends up touching a huge number of places.

Here's an attempt to refactor the code to instead pass around a control
structure. I think it's a definite win already now, and we can't just keep
adding new functionality on top of the current one.

I'll proceed to work on the actual functionality I was working on to go on
top of this separately, but would appreciate a review of this part
independently. It's mostly mechanical, but there may definitely be mistakes
- or thinkos in the whole idea...

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

Attachment Content-Type Size
basebackup.patch text/x-patch 31.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2016-02-14 21:16:35 Re: Removing Functionally Dependent GROUP BY Columns
Previous Message Christian Ullrich 2016-02-14 20:28:47 Re: pl/pgSQL, get diagnostics and big data