Unix Technical Forum

Schema synchronization

This is a discussion on Schema synchronization within the pgsql Admins forums, part of the PostgreSQL category; --> Hi all, I have several databases that I have to synchronize their schemas. I have been testing several programs ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 06:02 AM
Arnau
 
Posts: n/a
Default Schema synchronization

Hi all,

I have several databases that I have to synchronize their schemas. I
have been testing several programs like EMS PostgreSQL Comparer and
Navicat PostgreSQL but none of them does all I need. Any advise about
what is the best way to sync the schemas?

Thanks
--
Arnau

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 06:02 AM
John DeSoi
 
Posts: n/a
Default Re: Schema synchronization


On Apr 19, 2006, at 2:26 PM, Arnau wrote:

> I have several databases that I have to synchronize their
> schemas. I have been testing several programs like EMS PostgreSQL
> Comparer and Navicat PostgreSQL but none of them does all I need.
> Any advise about what is the best way to sync the schemas?


I think the best way is to do proper version control on files. After
initial version 1, create version 2 as a series of create table,
alter table, etc, statements to convert version 1 to version 2 and so
on. Changing databases independently with your favorite admin tool
and then trying to sync them up based on schema differences is
difficult. For example, I don't think there is a way for a comparison
program to know the difference between renaming a column and dropping
a column with the addition a new one of the same type. The semantics
of these two operations are very different.




John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 06:02 AM
Arnau
 
Posts: n/a
Default Re: Schema synchronization

John DeSoi wrote:
>
> On Apr 19, 2006, at 2:26 PM, Arnau wrote:
>
>> I have several databases that I have to synchronize their schemas.
>> I have been testing several programs like EMS PostgreSQL Comparer and
>> Navicat PostgreSQL but none of them does all I need. Any advise about
>> what is the best way to sync the schemas?

>
>
> I think the best way is to do proper version control on files. After
> initial version 1, create version 2 as a series of create table, alter
> table, etc, statements to convert version 1 to version 2 and so on.
> Changing databases independently with your favorite admin tool and then
> trying to sync them up based on schema differences is difficult. For
> example, I don't think there is a way for a comparison program to know
> the difference between renaming a column and dropping a column with the
> addition a new one of the same type. The semantics of these two
> operations are very different.


I know that should be the way to go, but this wasn't done in the
past. Since now on we have a version control system. Now I have some
DDBB to synchronize so I need to do something to solve the current
situation.

Thanks
--
Arnau

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:02 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com