Skip site navigation (1) Skip section navigation (2)

Re: Dev Process

From: "H(dot) Hall" <hhall1001(at)reedyriver(dot)com>
To: postgresql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Dev Process
Date: 2008-04-22 11:05:12
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
Medi Montaseri wrote:
> Hi,
> I was wondering if you could critique the following DB application 
> development process.
> Given a production DB and a Dev DB:
> 1- Develope schema and code on Dev including test data which will 
> impact sequences, etc
> 2- Dump the schema only (not the data) from Dev and restore it into 
> the production DB
> 3- Populate DB with real data, usage begins
> 4- Enhancement to schema on Dev DB including unit testing again with 
> impact on sequences
> 5- Dump schema and move to production
> 6- Goto 4
> Thanks
> Medi
The first problem is that you will have to take the production DB down 
to update it. Another problem with this method is that if you encounter 
problems while restoring data, then the down time could extend farther 
than your plan. Problems reloading the data can arise from new 
constraints etc. Finally,  you should consider testing the application 
program(s) as part of your update process.

A better plan might be to:

- Use only script files to update the dev server and use the same script 
files to update the test server (described below) and the production server.

- Keep a log of changes to the dev and production servers. This shows 
when the script files were run on each server and gives you a quick view 
of the state of each.

- Use a third server, a test server to test the update prior to updating 
the production server. The test server schema should be at the same 
state as the production server, prior to the update. Update the test 
server using the script files and test your applications against it. 
Then update the db server.

The log let's you see what needs to be done. Use of the script files 
gives you the repeatability you need. Updating the test server first 
gives you the validation you need without the heart attacks.

The test server can be very light, i.e. anything that will run postgres.


H. Hall
ReedyRiver Group LLC

In response to

  • Dev Process at 2008-04-18 18:52:57 from Medi Montaseri

pgsql-admin by date

Next:From: Hajek, NickDate: 2008-04-22 14:14:10
Subject: Server Crash
Previous:From: Michael MonnerieDate: 2008-04-22 10:27:26
Subject: Re: FATAL: could not open relation xxx: No such file or directory

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group