From: | Joachim Wieland <joe(at)mcknight(dot)de> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: patch for parallel pg_dump |
Date: | 2012-03-19 03:31:47 |
Message-ID: | CACw0+12Hc36DhOyq87i881fcDB1e5Mck2xVt16TsTUM2vCMhSA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Mar 14, 2012 at 2:02 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> I think we should somehow unify both functions, the code is not very
>> consistent in this respect, it also calls exit_horribly() when it has
>> AH available. See for example pg_backup_tar.c
>
> I think we should get rid of die_horribly(), and instead have arrange
> to always clean up AH via an on_exit_nicely hook.
Attached is a patch that gets rid of die_horribly().
For the parallel case it maintains an array with as many elements as
we have worker processes. When the workers start, they enter their Pid
(or ThreadId) and their ArchiveHandle (AH). The exit handler function
in a process can then find its own ArchiveHandle by comparing the own
Pid with all the elements in the array.
Attachment | Content-Type | Size |
---|---|---|
pg_dump_die_horribly.diff | text/x-patch | 96.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Shigeru Hanada | 2012-03-19 04:44:18 | Re: Why does exprCollation reject List node? |
Previous Message | HuangQi | 2012-03-19 03:11:28 | Re: Gsoc2012 Idea --- Social Network database schema |