Thread: multithreading

multithreading

From
"Anton Melser"
Date:
Hi,
Just a quick question... are there any plans to multithread the
restore from dump functionality? pgadmin spends several minutes
(around 15) "not responding" while I restore my 700MB dump... and it's
working away fine. It's not a biggie, but it would be nice to have the
interface telling me "I'm on it"... It would probably be quite
complicated to do but logically there seems no reason why I couldn't
use pgadmin for work on another db while it's restoring...
Cheers
Anton

-- 
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq' | dc
This will help you for 99.9% of your problems ...


Re: multithreading

From
"Dave Page"
Date:
On Tue, Jun 10, 2008 at 10:45 AM, Anton Melser <melser.anton@gmail.com> wrote:
> Hi,
> Just a quick question... are there any plans to multithread the
> restore from dump functionality? pgadmin spends several minutes
> (around 15) "not responding" while I restore my 700MB dump... and it's
> working away fine. It's not a biggie, but it would be nice to have the
> interface telling me "I'm on it"... It would probably be quite
> complicated to do but logically there seems no reason why I couldn't
> use pgadmin for work on another db while it's restoring...
>

The restore runs in an entirely separate process from pgAdmin, and
doesn't stop you continuing to work whilst it runs (at least in my
limited testing here). Maybe you're seeing some platform-specific
quirk - what version are you running on what platform?

-- 
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com


Re: multithreading

From
"Anton Melser"
Date:
2008/6/10 Dave Page <dpage@pgadmin.org>:
> On Tue, Jun 10, 2008 at 10:45 AM, Anton Melser <melser.anton@gmail.com> wrote:
>> Hi,
>> Just a quick question... are there any plans to multithread the
>> restore from dump functionality? pgadmin spends several minutes
>> (around 15) "not responding" while I restore my 700MB dump... and it's
>> working away fine. It's not a biggie, but it would be nice to have the
>> interface telling me "I'm on it"... It would probably be quite
>> complicated to do but logically there seems no reason why I couldn't
>> use pgadmin for work on another db while it's restoring...
>>
>
> The restore runs in an entirely separate process from pgAdmin, and
> doesn't stop you continuing to work whilst it runs (at least in my
> limited testing here). Maybe you're seeing some platform-specific
> quirk - what version are you running on what platform?

Um... not on either Windows XP or Windows Server 2008 Standard
(finally a decent desktop!)... pgadmin stays "not responding" for the
entire restore. And yes, it's 1.8.4.
Cheers
Anton


Re: multithreading

From
"Anton Melser"
Date:
2008/6/10 Anton Melser <melser.anton@gmail.com>:
> 2008/6/10 Dave Page <dpage@pgadmin.org>:
>> On Tue, Jun 10, 2008 at 10:45 AM, Anton Melser <melser.anton@gmail.com> wrote:
>>> Hi,
>>> Just a quick question... are there any plans to multithread the
>>> restore from dump functionality? pgadmin spends several minutes
>>> (around 15) "not responding" while I restore my 700MB dump... and it's
>>> working away fine. It's not a biggie, but it would be nice to have the
>>> interface telling me "I'm on it"... It would probably be quite
>>> complicated to do but logically there seems no reason why I couldn't
>>> use pgadmin for work on another db while it's restoring...
>>>
>>
>> The restore runs in an entirely separate process from pgAdmin, and
>> doesn't stop you continuing to work whilst it runs (at least in my
>> limited testing here). Maybe you're seeing some platform-specific
>> quirk - what version are you running on what platform?
>
> Um... not on either Windows XP or Windows Server 2008 Standard
> (finally a decent desktop!)... pgadmin stays "not responding" for the
> entire restore. And yes, it's 1.8.4.

WinXP 32 bit, Win2008 x64.


-- 
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq' | dc
This will help you for 99.9% of your problems ...


Re: multithreading

From
"Dave Page"
Date:
On Tue, Jun 10, 2008 at 1:40 PM, Anton Melser <melser.anton@gmail.com> wrote:
> 2008/6/10 Dave Page <dpage@pgadmin.org>:
>> The restore runs in an entirely separate process from pgAdmin, and
>> doesn't stop you continuing to work whilst it runs (at least in my
>> limited testing here). Maybe you're seeing some platform-specific
>> quirk - what version are you running on what platform?
>
> Um... not on either Windows XP or Windows Server 2008 Standard
> (finally a decent desktop!)... pgadmin stays "not responding" for the
> entire restore. And yes, it's 1.8.4.

I was testing on XP. In further testing, I find that a restore using
the 'clean' option (new in SVN trunk) for some reason doesn't lock up
the UI as other restores do (which are blocking whilst trying to read
from the pg_restore stderr/stdout streams) . I cannot see any clear
reason for this behaviour.

A 'real' fix would probably involve firing off
ExternProcessDialog::checkStreams() from a separate thread, rather
than a timer in the main thread, though it would be nice to understand
why it blocks in some cases but not others. Anyone with time to try
that?

-- 
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com