Dear Rod,
That sounds as good as simple ;) As for as patching, we do something like
that. Developed a PHP script that compares schema files (not dumps, but
source codes instead) to the actual. Say, it creates a temp table and
compares it to the existing one, examining pg_attributes, pg_indexes,
pg_constraints etc. then runs appropriate ALTER TABLE commands on the old
table. Creating a clean double of the prod and keeping its schema sounds
good to handle exceptional things.
Yours,
G.
%----------------------- cut here -----------------------%
\end
----- Original Message -----
From: "Rod Taylor" <pg@rbt.ca>
Sent: Tuesday, July 13, 2004 8:03 PM
> When building a new box to duplicate production:
> 1. Apply all patches in order
> for i in `ls *.sql` ; do cat $i | psql test_db ; done
> 2. Do a data dump of production and restore that to the testing area
> pg_dump --data-only prod_db | psql test_db
>
> Now you don't need to worry about whether the production schema will or
> will not dump properly, since you can reproduce that using external
> files.