Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id D63DB1337B34 for ; Thu, 20 Jan 2011 13:42:15 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 87072-07 for ; Thu, 20 Jan 2011 17:42:08 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.shawcable.com (shawmail.shawcable.com [64.59.128.220]) by mail.postgresql.org (Postfix) with ESMTP id 2843213364DE for ; Thu, 20 Jan 2011 13:42:07 -0400 (AST) Received: from bpd2mi2no-svcs.prod.shawcable.com ([10.0.184.121]) by bpd2mo2no-ssvc.prod.shawcable.com with ESMTP; 20 Jan 2011 10:42:06 -0700 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=l0hTUOwXBBZC3xuFbE1ochJnP84ph5EBJB8ZSEz2E7A= c=1 sm=1 a=fKHZdZmfl1IA:10 a=BLceEmwcHowA:10 a=kj9zAlcOel0A:10 a=rFBdEGy9vS/m0A3AhxL8nA==:17 a=pGLkceISAAAA:8 a=epTmVMiNAAAA:8 a=GbhIXFikAAAA:8 a=C9ZUX6UaOPOE5U8F8JQA:9 a=sOC0X2tqlKw-NScL1lQA:7 a=Re-rJKmNGC4m7dJmJtoi4r88znMA:4 a=CjuIK1q_8ugA:10 a=MSl-tDqOz04A:10 a=YObXiYvaVLwA:10 a=YsdO3FDBEMUA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 X-IronPort-AV: E=Sophos;i="4.60,352,1291618800"; d="scan'208";a="394136498" Received: from unknown (HELO bpd2mi2no-cmts.prod.shawcable.com) ([192.168.183.121]) by bpd2mi2no-cmts.prod.shawcable.com with ESMTP; 20 Jan 2011 10:42:05 -0700 X-reinject: true Received: from unknown (HELO BradleyHolbrook) ([24.67.39.150]) by bpd2mi2no-dmz.prod.shawcable.com with ESMTP; 20 Jan 2011 10:42:05 -0700 From: "Bradley Holbrook" To: "'Scott Marlowe'" , "'French, Martin'" Cc: References: <036101cbb6a3$baa178e0$2fe46aa0$@servillian.ca> <81976671721DF04B9DCA6ECD87941A402640812A@roundway.Cromwell-tools.co.uk> <004e01cbb730$bdb21930$39164b90$@servillian.ca> <81976671721DF04B9DCA6ECD87941A402640863E@roundway.Cromwell-tools.co.uk> <81976671721DF04B9DCA6ECD87941A40264B2BB5@roundway.Cromwell-tools.co.uk> In-Reply-To: Subject: Re: Postgres Backup Utility Date: Thu, 20 Jan 2011 09:42:02 -0800 Message-ID: <01af01cbb8c9$58eaa0e0$0abfe2a0$@servillian.ca> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQHHkvKLrosR4aSyAm2SjCI6Zq933AO9xqP7Akk6VIIDAixhoAH4cdVIAfRS2jAC6GVMfpNjcQpw Content-Language: en-ca X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201101/126 X-Sequence-Number: 36566 Thanks Scott... a couple comments. Our developers never decide what goes to where... they just happily plumb away on the development db until we're ready to take our product to testing (at regular intervals), once QA is passed, we wish to apply these to live. We have several diff tools and sync tools, but they take forever (especially the ones that only go one schema at a time). The DDL Logging sounds like a sufficient solution, can it be configured to only record create and alter commands (or create or replace commands on functions or updates on sequences, etc)? I'd likely write a script to have this emailed to me at the end of every day. I'm going to google DDL logging (never heard of it), but any good resources off the top of your head? Martin French is right though, ask your developers to write down all their SQL struct changes and they look at you funny... and being a developer myself I'd look at me funny. If you forget just once you're screwed into a day sifting through tables and code. -----Original Message----- From: Scott Marlowe [mailto:scott.marlowe@gmail.com] Sent: January-20-11 7:40 AM To: French, Martin Cc: Bradley Holbrook; pgsql-admin@postgresql.org Subject: Re: [ADMIN] Postgres Backup Utility On Thu, Jan 20, 2011 at 5:00 AM, French, Martin wrote: > Having been a C/C++ developer many years before being a DBA, and > having written ITIL software; How is migrating structure from a > Development database to a test database whilst maintaining test data backwards? It's not. doing by running diffs on ddl / schema is. This is what the OP asked for: "I need to be able to quickly apply the structure updates from a development database to a testing database, and do selective data updates (like on lookup tables, but not content tables)." > > Besides, the OP was asking how to diff to databases and create ddl, > not asking for us to comment on why he's doing it. Personally, I'd > rather Re-read what he asked for. He did not ask how to run diffs of schema, he asked how to update it with changes from a test database. The best way to do this is to check in changes to the database and lookup tables so the DBA can then apply them when needed to the various other databases. But hey, feel free to answer a question the OP didn't ask with an answer he doesn't need.