Обсуждение: pg_restore new option -m

Поиск
Список
Период
Сортировка

pg_restore new option -m

От
ohp@pyrenet.fr
Дата:
hi,

i've been testing new -m option of pg_restore with great pleasure.
first, let me thank the developpers, it cut restoring time by half.

is it normal that -m doesn't cope well with -C?

createdb db
pg_restore -m 4 -d db db.dmp
works like a charm while

pg_restore -C -m 4 -d template1 db.dmp
gives numerous errors, mostly no such relation at index creation time.

TIA
-- 
Olivier PRENANT                    Tel: +33-5-61-50-97-00 (Work)
15, Chemin des Monges                +33-5-61-50-97-01 (Fax)
31190 AUTERIVE                       +33-6-07-63-80-64 (GSM)
FRANCE                          Email: ohp@pyrenet.fr
------------------------------------------------------------------------------
Make your life a dream, make your dream a reality. (St Exupery)


Re: pg_restore new option -m

От
Tom Lane
Дата:
ohp@pyrenet.fr writes:
> pg_restore -C -m 4 -d template1 db.dmp
> gives numerous errors, mostly no such relation at index creation time.

You sure you don't get exactly the same without -m?
        regards, tom lane


Re: pg_restore new option -m

От
ohp@pyrenet.fr
Дата:
hi Tom,
On Wed, 18 Feb 2009, Tom Lane wrote:

> Date: Wed, 18 Feb 2009 13:41:34 -0500
> From: Tom Lane <tgl@sss.pgh.pa.us>
> To: ohp@pyrenet.fr
> Cc: pgsql-hackers list <pgsql-hackers@postgresql.org>
> Subject: Re: [HACKERS] pg_restore new option -m 
> 
> ohp@pyrenet.fr writes:
>> pg_restore -C -m 4 -d template1 db.dmp
>> gives numerous errors, mostly no such relation at index creation time.
>
> You sure you don't get exactly the same without -m?
>
yes!
>             regards, tom lane
>
the pg.gz script shows the output of :
pg_restore -C -m
pg_restore -C
dropdb;createdb; pg_restore -m

regards,
-- 
Olivier PRENANT                    Tel: +33-5-61-50-97-00 (Work)
15, Chemin des Monges                +33-5-61-50-97-01 (Fax)
31190 AUTERIVE                       +33-6-07-63-80-64 (GSM)
FRANCE                          Email: ohp@pyrenet.fr
------------------------------------------------------------------------------
Make your life a dream, make your dream a reality. (St Exupery)

Re: pg_restore new option -m

От
Tom Lane
Дата:
ohp@pyrenet.fr writes:
> On Wed, 18 Feb 2009, Tom Lane wrote:
>> You sure you don't get exactly the same without -m?
>> 
> yes!

We're going to need to see the test case then.
        regards, tom lane


Re: pg_restore new option -m

От
Andrew Dunstan
Дата:

ohp@pyrenet.fr wrote:
>>
>>> pg_restore -C -m 4 -d template1 db.dmp
>>> gives numerous errors, mostly no such relation at index creation time.
>>
>> You sure you don't get exactly the same without -m?
>>
> yes!

> the pg.gz script shows the output of :
> pg_restore -C -m
> pg_restore -C
> dropdb;createdb; pg_restore -m
>
>   


OK, I'll look at it later today.

cheers

andrew


Re: pg_restore new option -m

От
ohp@pyrenet.fr
Дата:
On Thu, 19 Feb 2009, Tom Lane wrote:

> Date: Thu, 19 Feb 2009 10:05:32 -0500
> From: Tom Lane <tgl@sss.pgh.pa.us>
> To: ohp@pyrenet.fr
> Cc: pgsql-hackers list <pgsql-hackers@postgresql.org>
> Subject: Re: [HACKERS] pg_restore new option -m 
> 
> ohp@pyrenet.fr writes:
>> On Wed, 18 Feb 2009, Tom Lane wrote:
>>> You sure you don't get exactly the same without -m?
>>>
>> yes!
>
> We're going to need to see the test case then.
>
>             regards, tom lane
>
they were included in the last mail :)
-- 
Olivier PRENANT                    Tel: +33-5-61-50-97-00 (Work)
15, Chemin des Monges                +33-5-61-50-97-01 (Fax)
31190 AUTERIVE                       +33-6-07-63-80-64 (GSM)
FRANCE                          Email: ohp@pyrenet.fr
------------------------------------------------------------------------------
Make your life a dream, make your dream a reality. (St Exupery)


Re: pg_restore new option -m

От
Andrew Dunstan
Дата:

Tom Lane wrote:
> ohp@pyrenet.fr writes:
>   
>> pg_restore -C -m 4 -d template1 db.dmp
>> gives numerous errors, mostly no such relation at index creation time.
>>     
>
> You sure you don't get exactly the same without -m?
>   



Yeah, I have reproduced this. It's because we reconnect to the wrong db 
in this case (i.e. to the -d database, not the created one) in the 
workers and subsequent connects.

I've applied a trivial patch to fix it.

cheers

andrew





Re: pg_restore new option -m

От
ohp@pyrenet.fr
Дата:
On Thu, 19 Feb 2009, Andrew Dunstan wrote:

> Date: Thu, 19 Feb 2009 21:58:18 -0500
> From: Andrew Dunstan <andrew@dunslane.net>
> To: Tom Lane <tgl@sss.pgh.pa.us>
> Cc: ohp@pyrenet.fr, pgsql-hackers list <pgsql-hackers@postgresql.org>
> Subject: Re: [HACKERS] pg_restore new option -m
> 
>
>
> Tom Lane wrote:
>> ohp@pyrenet.fr writes:
>> 
>>> pg_restore -C -m 4 -d template1 db.dmp
>>> gives numerous errors, mostly no such relation at index creation time.
>>> 
>> 
>> You sure you don't get exactly the same without -m?
>> 
>
>
>
> Yeah, I have reproduced this. It's because we reconnect to the wrong db in 
> this case (i.e. to the -d database, not the created one) in the workers and 
> subsequent connects.
>
> I've applied a trivial patch to fix it.
>
works like a  charm!
> cheers
>
> andrew
>
>
>
>
thanks
-- 
Olivier PRENANT                    Tel: +33-5-61-50-97-00 (Work)
15, Chemin des Monges                +33-5-61-50-97-01 (Fax)
31190 AUTERIVE                       +33-6-07-63-80-64 (GSM)
FRANCE                          Email: ohp@pyrenet.fr
------------------------------------------------------------------------------
Make your life a dream, make your dream a reality. (St Exupery)