X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E03DA528C3 for ; Sat, 25 Jun 2005 00:02:15 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 92717-06 for ; Sat, 25 Jun 2005 03:02:12 +0000 (GMT) Received: from mout0.freenet.de (mout0.freenet.de [194.97.50.131]) by svr1.postgresql.org (Postfix) with ESMTP id 7CA325280C for ; Sat, 25 Jun 2005 00:02:11 -0300 (ADT) Received: from [194.97.50.136] (helo=mx3.freenet.de) by mout0.freenet.de with esmtpa (Exim 4.52) id 1Dm0vq-00048T-23 for pgsql-admin@postgresql.org; Sat, 25 Jun 2005 05:02:10 +0200 Received: from ip68-6-204-101.sd.sd.cox.net ([68.6.204.101] helo=[192.168.1.147]) by mx3.freenet.de with esmtpsa (ID nspmma@freenet.de) (TLSv1:AES256-SHA:256) (Exim 4.52 #6) id 1Dm0vp-0003oU-Hb for pgsql-admin@postgresql.org; Sat, 25 Jun 2005 05:02:10 +0200 Message-ID: <42BCC950.5090006@freenet.de> Date: Fri, 24 Jun 2005 20:02:40 -0700 From: Alberto User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: pg_dump -Fc does not dump indexes Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200506/242 X-Sequence-Number: 17997 Hi everybody, I have tried to backup my postgres database with pg_dump -Fc $db > ~/backups/$db.backup.c and restore it with: createdb -U postgres -D aestel_admin -T template0 restoreTMP pg_restore -d restoreTMP -U postgres $db.backup.c I do not get any error messages but none of my indexes are created. None of the primary key or foreign key constraint are created. However simple check constraints are created. Using the -v flag does not show any index creation. Using the -l option to list the commands does not show any indexes either. pg_restore -lv -U postgres $db.backup.c pg_dump -vFc does produce lines like: pg_dump: reading indexes for table "acc_controlled_expression" If I do not use the -Fc option just plain pg_dump $db >t then "Alter Table add constraint PRIMARY KEY" and foreign key statements are created as well as create unique index statements. Is this a known feature, other people must be using the same commands. Do I need to use pg_dump without the -FC option to create the tables, indexes and constraints? Am I missing something? Any help is greatly appreciated. Thanks, Alberto Gobbi