Re: Updating a production database schema from dev server

From: Michael Crozier <crozierm(at)conducivetech(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Updating a production database schema from dev server
Date: 2007-10-16 18:35:20
Message-ID: Pine.GSO.4.64.0710161123580.531@sss.sight-n-sound.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> Stanislav Raskin wrote:
>>
>> I figure there must be a better way to do so. Is there some kind of
>> software, which compares two database schemas (preferably two sql dumps),
>> and generates a script for applying differences to one of them?
>> What would be the best practice for applying such updates without
>> endangering the data and its integrity?
>
> What Scott said, unfortunately there's no substitute for discipline here.
>
> It's not actually possible to fully automate this (what would it do if you
> merged the data in two columns for example). There are some tools to help you
> though - try searching for "diff" on www.pgfoundry.org or "pgdiff" in google.

Inspired by the tool "rancid", used to monitor router configs, I'm
configuring a cronjob that pg_dump's the schema from our development
database server to a file in CVS. The schema file will be tagged
with the rest of our software and configuration files between our
releases, so we'll be able to diff schemas between releases and double
check our release procedure.

This too is not a substitute for real discipline, but it will help.

-Michael

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kynn Jones 2007-10-16 18:35:38 How to set config param temporarily?
Previous Message Laurent Duperval 2007-10-16 18:24:20 Re: 8.2.3: Server crashes on Windows using Eclipse/Junit