X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id AFE8911F6C4F for ; Fri, 14 Apr 2006 00:15:21 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: 0.125 X-Spam-Level: X-Spam-Status: No, score=0.125 required=5 tests=[AWL=0.125] Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id KmRSv6xTxTai for ; Fri, 14 Apr 2006 00:15:19 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 2C94311F6AFA for ; Fri, 14 Apr 2006 00:15:18 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k3E3FH4s004414; Thu, 13 Apr 2006 23:15:17 -0400 (EDT) To: "patrick keshishian" cc: pgsql-performance@postgresql.org Subject: Re: pg 7.4.x - pg_restore impossibly slow In-reply-to: <53b425b00604131826s2872bd49id2ac1ab99a5fade4@mail.gmail.com> References: <53b425b00604121826x213fe2fdmc793e22026469923@mail.gmail.com> <9585.1144903611@sss.pgh.pa.us> <53b425b00604131826s2872bd49id2ac1ab99a5fade4@mail.gmail.com> Comments: In-reply-to "patrick keshishian" message dated "Thu, 13 Apr 2006 18:26:00 -0700" Date: Thu, 13 Apr 2006 23:15:17 -0400 Message-ID: <4413.1144984517@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200604/321 X-Sequence-Number: 18405 "patrick keshishian" writes: > With these settings and running: > pg_restore -vaOd dbname dbname.DUMP If you had mentioned you were using random nondefault switches, we'd have told you not to. -a in particular is a horrid idea performancewise --- a standard schema-plus-data restore goes way faster because it's doing index builds and foreign key checks wholesale instead of incrementally. > Is this because the -c option drops all foreign keys and > so the restore goes faster? Should this be the preferred, > recommended and documented method to run pg_restore? It is documented in recent versions of the documentation: see http://www.postgresql.org/docs/8.1/static/populate.html particularly the last section. regards, tom lane