Re: patch for parallel pg_dump

Поиск
Список
Период
Сортировка
От Joachim Wieland
Тема Re: patch for parallel pg_dump
Дата
Msg-id CACw0+11KAQRBbBNuO+VSxbXg+fPh6SjqxJohvr9QPmBLx6Z=4A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: patch for parallel pg_dump  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: patch for parallel pg_dump
Список pgsql-hackers
On Mon, Mar 19, 2012 at 9:14 PM, Alvaro Herrera
<alvherre@commandprompt.com> wrote:
> Sounds good to me in general ... my only gripe is this: I wonder if it
> would be better to have a central routine that knows about both
> archive_close_connection and archive_close_connection_parallel -- and
> the argument to the callback is a struct that contains both a pointer to
> the struct with the connection to be closed [...]

I had a similar idea before but then concluded that for it you need to
have this struct globally available so that everybody (pg_dump.c /
pg_restore.c / pg_backup_archive.c) can access it to set the
appropriate state.

I gave it a second thought and now just defined a function that these
consumers can call, that way the variable can stay at file scope at
least.

Also we don't need this switch, we can set the ParallelState in the
struct before any child forks off and reset it to NULL after the last
child has terminated.

New patch attached, thanks for your comments.

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Memory usage during sorting
Следующее
От: Qi Huang
Дата:
Сообщение: Re: Gsoc2012 Idea --- Social Network database schema