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 2DBAC5294F for ; Sat, 25 Jun 2005 12:55:07 -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 35295-02 for ; Sat, 25 Jun 2005 15:55:02 +0000 (GMT) Received: from mout0.freenet.de (mout0.freenet.de [194.97.50.131]) by svr1.postgresql.org (Postfix) with ESMTP id F2A0452932 for ; Sat, 25 Jun 2005 12:54:59 -0300 (ADT) Received: from [194.97.55.147] (helo=mx4.freenet.de) by mout0.freenet.de with esmtpa (Exim 4.52) id 1DmCzi-0002Xg-H4 for pgsql-admin@postgresql.org; Sat, 25 Jun 2005 17:54:58 +0200 Received: from ip68-6-204-101.sd.sd.cox.net ([68.6.204.101] helo=[192.168.1.147]) by mx4.freenet.de with esmtpsa (ID nspmma@freenet.de) (TLSv1:AES256-SHA:256) (Exim 4.52 #6) id 1DmCzi-0006Z9-6j for pgsql-admin@postgresql.org; Sat, 25 Jun 2005 17:54:58 +0200 Message-ID: <42BD7E72.3050201@freenet.de> Date: Sat, 25 Jun 2005 08:55:30 -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.393 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/212 X-Sequence-Number: 17967 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