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

Synchronizing the schema of two PostgreSQL databases

From: "Jason Stelzel" <postgreslist(at)epigraf(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Synchronizing the schema of two PostgreSQL databases
Date: 2009-07-28 17:44:11
Message-ID: 9A1864CBD3E94C518A336C0FBF9D0D09@acer32061217d9 (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Hello, (my first post to this list)

I'm trying to figure out if there is any easy way to keep the schema of two totally separate databases synchronized.  And by that, I mean that if a column is added to one database, is there an easy way to automagically have the other database also include that added column (and vice versa)?  I was thinking of something along the lines of capturing the confirmation commands that postgres spits out when a change is made to the database and somehow "playing those commands back" to the other database.  Another approach might be to "backup" a schema-only representation of a table and then "restore" it to the other database.  I realize that this may be a strange application of pgsql (I can hear people asking right now "Why don't you just use a single database and separate the uses logically?") but this is the requirement I've been tasked with and I understand the application needs as being valid.  Thanks in advance for any guidance anyone can provide.

Also, is there a concept of a postgres database not having a password?  I was using a system which did not require a password (meaning the password field was empty when connecting to it) and the application that accesses it did a conversion of the database to a newer version and now I am locked out of it (using pgAdmin III).

Jason Stelzel

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4286 (20090728) __________

The message was checked by ESET NOD32 Antivirus.


pgsql-novice by date

Next:From: Lacey PowersDate: 2009-07-28 22:28:01
Subject: Re: Synchronizing the schema of two PostgreSQL databases
Previous:From: Michael WoodDate: 2009-07-28 17:05:19
Subject: Re: column name does not exist

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