Re: pg_dump refactor patch to remove global variables

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: pg_dump refactor patch to remove global variables
Дата
Msg-id 20141013211752.GA7043@eldon.alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: pg_dump refactor patch to remove global variables  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: pg_dump refactor patch to remove global variables
Список pgsql-hackers
Alvaro Herrera wrote:
> Here's the complete patch in case anyone is wondering.

I found out that with just a little bit of extra header hacking, the
whole thing ends up cleaner -- for instance, with the attached patch,
pg_backup_archiver.h is no longer needed by pg_backup_db.h.  I also
tweaked things so that no .h file includes postgres_fe.h, but instead
every .c file includes it before including anything else, as is already
customary for postgres.h in backend code.

The main changes herein are:

* some routines in pg_backup_db.c/h had an argument of type
ArchiveHandle.  I made them take Archive instead, and cast internally.
This is already done for some other routines.

* also in pg_backup_db.c/h, EndDBCopyMode() had an argument of type
TocEntry, and then it only uses te->tag for an error message.  If I
instead pass the te->tag I can remove the TocEntry, and there is no more
need for pg_backup_archiver.h in pg_backup_db.h.

* I moved exit_horribly() from parallel.h to pg_backup_utils.h, where
prototypes for other exit routines such as exit_nicely() are already
located.  (The implementation of exit_horribly() is in parallel.c, but
the prototype looks misplaced in parallel.h.)

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Вложения

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Obsolete comment within execTuples.c
Следующее
От: Jim Nasby
Дата:
Сообщение: Possible micro-optimization in CacheInvalidateHeapTuple