Re: Refectoring of receivelog.c

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Refectoring of receivelog.c
Дата
Msg-id CABUevEyGpbOB0uC0q-RuGc58FYNESnS8-S9pzFbjX2z+Bv+iEQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Refectoring of receivelog.c  (Craig Ringer <craig@2ndquadrant.com>)
Ответы Re: Refectoring of receivelog.c  (Daniel Gustafsson <daniel@yesql.se>)
Список pgsql-hackers


On Mon, Feb 15, 2016 at 7:15 AM, Craig Ringer <craig@2ndquadrant.com> wrote:
On 15 February 2016 at 04:48, Magnus Hagander <magnus@hagander.net> wrote:
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.
 

Other than the lack of comments on the fields in StreamCtl to indicate their functions I think this looks good.

I copied that lack of comments from the previous implementation :P

But yeah, I agree, it's probably a good idea to add them.

 
I didn't find any mistakes, but I do admit my eyes started glazing over after a bit.

I'd rather not have StreamCtl as a typedef of an anonymous struct if it's exposed in a header though. It should have a name that can be used in forward declarations etc.


It's not exactly uncommon with anonymous ones either in our code, but I see no problem adding that.

Thanks!


-- 

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Daniel Verite"
Дата:
Сообщение: Re: [patch] Proposal for \crosstabview in psql
Следующее
От: Teodor Sigaev
Дата:
Сообщение: Re: Small PATCH: check of 2 Perl modules