pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Dev Process
2+ messages / 2 participants
[nested] [flat]

* Dev Process
@ 2008-04-18 18:52  Medi Montaseri <montaseri@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Medi Montaseri @ 2008-04-18 18:52 UTC (permalink / raw)
  To: pgsql-admin

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

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Dev Process
@ 2008-04-22 11:05  H. Hall <hhall1001@reedyriver.com>
  parent: Medi Montaseri <montaseri@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: H. Hall @ 2008-04-22 11:05 UTC (permalink / raw)
  To: 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.

--cheers
HH


H. Hall
ReedyRiver Group LLC
site: reedyriver.com





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2008-04-22 11:05 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-04-18 18:52 Dev Process Medi Montaseri <montaseri@gmail.com>
2008-04-22 11:05 ` H. Hall <hhall1001@reedyriver.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox