Re: parallel restore vs. windows

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Andrew Chernow <ac(at)esilo(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: parallel restore vs. windows
Date: 2008-12-09 16:34:06
Message-ID: 493E9DFE.2080601@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Chernow wrote:
>
> Looks like the ArchiveHandle variable 'AH' and the TocEntry
> 'next_work_item' are not being deep copied at line 315 of your patch,
> where you prepare the RestoreArgs struct for the thread. Every thread
> is accessing and possibly updating the members of these structs that
> need to be deep copied.
>

Each thread deals with a different TocEntry, which no other thread deals
with, so there should be no need to clone it, I believe.

Parts of AH need deep cloning, notably the formatData member, which is
done in _ReopenArchive().

I am aware that there are some minor memory leaks, which I will remedy.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2008-12-09 16:35:04 Re: contrib/pg_stat_statements 1202
Previous Message Alvaro Herrera 2008-12-09 16:29:15 Re: Multiplexing SUGUSR1