pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rosser Schwarz <rosser.schwarz@gmail.com>
To: Chris Hoover <revoohc@sermonaudio.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Any tools to compare db's
Date: Mon, 20 Dec 2004 22:46:46 -0600
Message-ID: <37d451f704122020467fa9046b@mail.gmail.com> (raw)
In-Reply-To: <41C76824.1030904@sermonaudio.com>
References: <MAILSERVERoFLaqSOc700000355@mail.astudios.com>
	<37d451f70412200944b09c7d4@mail.gmail.com>
	<AcTm8BYkWkpLCleURqiwLAeX5L6vRQ==>
	<41C76824.1030904@sermonaudio.com>

while you weren't looking, Chris Hoover wrote:

> That really does not work.  It will tell you line by line differences,
> but not what object it is.  Also, it does not help to generate the sql
> to sync the db's.

There are graphical diff tools that will show the relationships
between the various blocks in two files.  gtkdiff, for example, has
generally been pretty good in my experience.  You should also be able
to tell diff how many lines of context you want to see.  (Even that
might not be sufficient, though.  We have a few two hundred-odd column
tables; allowing enough context to cover those cases, you might as
well be reading the whole schema yourself and writing down the
differences.)

As for generating the SQL, you're asking for something one might
expect from an ER tool; you might similarly expect to pay quite a bit
for it. IIRC, DataArchitect (q.v., at thekompany.com) may have
something to that effect in a forthcoming release, but I've never had
much -- read, any -- success getting the app to work -- read, even
connect.  It's too bad, too; the tool looks pretty slick otherwise.

If nothing else, you might be able to kludge together a fix between
what works in EMS' product (which a colleague uses and swears by) to
sync the relations, and saying

pg_dump --schema-only database | grep GRANT - > grants.sql

on the "correct" database.  Then sync your permissions by running the
grants script against the less correct one.  There may also be
additional steps; I don't know if EMS' tool will also sync users and
groups, as just one quick example.

Nothing I'm aware of will do it in a click or three, though.

/rls

-- 
:wq



view thread (7+ messages)  latest in thread

Message-ID: <37d451f704122020467fa9046b@mail.gmail.com>
Permalink:  ../37d451f704122020467fa9046b@mail.gmail.com/
Also on:    postgresql.org/message-id/37d451f704122020467fa9046b@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: rosser.schwarz@gmail.com, revoohc@sermonaudio.com
  Subject: Re: Any tools to compare db's
  In-Reply-To: <37d451f704122020467fa9046b@mail.gmail.com>
  References: <MAILSERVERoFLaqSOc700000355@mail.astudios.com> <37d451f70412200944b09c7d4@mail.gmail.com> <AcTm8BYkWkpLCleURqiwLAeX5L6vRQ==> <41C76824.1030904@sermonaudio.com> <37d451f704122020467fa9046b@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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