Re: pg_restore problem with 7.3.1

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Ian Burrell <ib(at)onsitetech(dot)com>, pgsql-admin(at)postgresql(dot)org, Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Subject: Re: pg_restore problem with 7.3.1
Date: 2003-02-18 01:51:01
Message-ID: 200302180151.h1I1p1M27555@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


Did this ever get addressed?

---------------------------------------------------------------------------

Tom Lane wrote:
> Ian Burrell <ib(at)onsitetech(dot)com> writes:
> > I just recreated the problem with a slightly different command. The
> > problem was caused by using a list file to skip loading some function
> > definitions that were causing problems. The command that loaded
> > everything into template1 was:
>
> > pg_restore -C -d template1 -L mpmx.lst -Ft mpmx.tar
>
> > It looks like the CREATE DATABASE call isn't done unless the -C flag is
> > included both when the list file is created and when doing the restore.
>
> Yeah, that seems to make sense. I observe that -C causes an additional
> entry to be made in the list file:
>
> $ pg_restore -l r.tar >r.lst
> $ pg_restore -C -l r.tar >r.lstc
> $ diff r.lst r.lstc
> 13a14
> > 1; 0 DATABASE regression postgres
>
> and it makes sense that the actual CREATE DATABASE command would be
> issued when that TOC entry is processed (if -C was given).
>
> Offhand it seems to me that -l should produce this list-file entry
> always, regardless of -C; and perhaps "pg_restore -C -L" should
> complain if it doesn't find a DATABASE entry in the list (though I'm
> unsure how hard that is to implement).
>
> Philip, any comments? Do you have time to fix this?
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2003-02-18 02:12:48 Re: server won't shutdown
Previous Message Ed L. 2003-02-18 01:25:48 Re: please help--database just locks up.