X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B7B14D1B1A1 for ; Tue, 13 Jul 2004 15:21:01 -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 85307-08 for ; Tue, 13 Jul 2004 18:20:53 +0000 (GMT) Received: from fe06.axelero.hu (fe06.axelero.hu [195.228.240.94]) by svr1.postgresql.org (Postfix) with ESMTP id 2D591D1B170 for ; Tue, 13 Jul 2004 15:20:48 -0300 (ADT) Received: from fe06 (localhost-02 [127.0.2.1]) by fe06.axelero.hu (8.12.11/8.12.11) with SMTP id i6DIKmJv052507 for ; Tue, 13 Jul 2004 20:20:49 +0200 (CEST) Received: from fe06.axelero.hu [127.0.2.1] via SMTP gateway by fe06 [195.228.240.94]; id A0CD14A12F2 at Tue, 13 Jul 2004 20:20:48 +0200 Received: from fejleszt4 (121-248-182-81.adsl-fixip.axelero.hu [81.182.248.121]) by fe06.axelero.hu (8.12.11/8.12.11) with SMTP id i6DIKlPh052495 for ; Tue, 13 Jul 2004 20:20:48 +0200 (CEST) Message-ID: <024801c46906$10d87d00$0403a8c0@fejleszt4> From: "=?iso-8859-2?B?U1rbQ1MgR+Fib3I=?=" To: References: <00a001c4680b$f14c60a0$0403a8c0@fejleszt4> <1089636713.58812.37.camel@jester> <01f401c468f6$90905c80$0403a8c0@fejleszt4> <1089739239.48027.64.camel@jester> <022401c46900$b85c26e0$0403a8c0@fejleszt4> <1089741816.48027.89.camel@jester> Subject: Re: Constraint->function dependency and dump in 7.3 Date: Tue, 13 Jul 2004 20:20:24 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-RAVMilter-Version: 8.4.3(snapshot 20030217) (fe06.axelero.hu) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/85 X-Sequence-Number: 18337 Dear Rod, That sounds as good as simple ;) As for as patching, we do something like that. Developed a PHP script that compares schema files (not dumps, but source codes instead) to the actual. Say, it creates a temp table and compares it to the existing one, examining pg_attributes, pg_indexes, pg_constraints etc. then runs appropriate ALTER TABLE commands on the old table. Creating a clean double of the prod and keeping its schema sounds good to handle exceptional things. Yours, G. %----------------------- cut here -----------------------% \end ----- Original Message ----- From: "Rod Taylor" Sent: Tuesday, July 13, 2004 8:03 PM > When building a new box to duplicate production: > 1. Apply all patches in order > for i in `ls *.sql` ; do cat $i | psql test_db ; done > 2. Do a data dump of production and restore that to the testing area > pg_dump --data-only prod_db | psql test_db > > Now you don't need to worry about whether the production schema will or > will not dump properly, since you can reproduce that using external > files.