X-Original-To: pgsql-admin@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 88B58475F5A for ; Thu, 6 Feb 2003 13:13:57 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 2EBE9475E30 for ; Thu, 6 Feb 2003 13:04:42 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h16I4Y5u013836; Thu, 6 Feb 2003 13:04:34 -0500 (EST) To: Ian Burrell Cc: pgsql-admin@postgresql.org, Philip Warner Subject: Re: pg_restore problem with 7.3.1 In-reply-to: <3E419B26.1040707@onsitetech.com> References: <3E3B18DA.4010601@onsitetech.com> <7462.1044117389@sss.pgh.pa.us> <3E419B26.1040707@onsitetech.com> Comments: In-reply-to Ian Burrell message dated "Wed, 05 Feb 2003 15:15:50 -0800" Date: Thu, 06 Feb 2003 13:04:33 -0500 Message-ID: <13835.1044554673@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/88 X-Sequence-Number: 7286 Ian Burrell 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