From: | "Erik Rijkers" <er(at)xs4all(dot)nl> |
---|---|
To: | "Joachim Wieland" <joe(at)mcknight(dot)de> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: patch for parallel pg_dump |
Date: | 2012-03-20 04:03:06 |
Message-ID: | 5aa999b83aaafc77d612842e27a2619d.squirrel@webmail.xs4all.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, March 20, 2012 04:04, Joachim Wieland wrote:
> On Mon, Mar 19, 2012 at 9:14 PM, Alvaro Herrera
> <alvherre(at)commandprompt(dot)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.
>
[pg_dump_die_horribly.2.diff ]
In my hands, the patch complains:
In file included from gram.y:13255:0:
scan.c: In function yy_try_NUL_trans:
scan.c:16243:23: warning: unused variable yyg [-Wunused-variable]
pg_backup_archiver.c:3320:1: error: static declaration of archive_close_connection follows
non-static declaration
pg_backup.h:170:13: note: previous declaration of archive_close_connection was here
make[3]: *** [pg_backup_archiver.o] Error 1
make[2]: *** [all-pg_dump-recurse] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all-bin-recurse] Error 2
make: *** [all-src-recurse] Error 2
-- make returned 2 - abort
Erik Rijkers
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2012-03-20 04:08:22 | Re: Cross-backend signals and administration (Was: Re: pg_terminate_backend for same-role) |
Previous Message | Qi Huang | 2012-03-20 03:47:52 | Re: Gsoc2012 Idea --- Social Network database schema |