From: Jesus Sandoval <meli@mzt.megared.net.mx>
Cc: pgsql-admin@postgresql.org
Subject: Database maintenance help
Date: Sat, 14 Dec 2002 01:23:52 +0000
Message-ID: <3DFA8828.629086@mzt.megared.net.mx> (raw)
References: <3DFA3D06.9080308@unboundtech.com>
<28985.1039812229@sss.pgh.pa.us>
I want to know where to find information about database maintenance as a
developer.
I'm distributing the executable along with the Definition of the database.
After some time, I made changes to the executable and to some tables too.
I have to apply the database changes to the production database and do the
following:
1) Backup the database data, pg_dump is of no use because if the table design
changed then the COPY table FROM stdin produced by pg_dump needs to be
modified to accomodate the space for the new columns.
2) Disable the data integrity checking
3) Drop the table (this drops the Foreign Key constraints)
4) Create the table with the new data layout or definition
5) Insert in the new table the old values (including the new columns or
dropping some columns)
6) Define the data integrity checking
7) Enable the data integrity checking (I'm not sure if this checks the
initial integrity or just start checking with the future inserts and
updates???)
All this is done manually and have to do very detailed analisis and planning
for each change with the customer.
The question is, has somebody faced this kind of problems and found some
automation possibly (even some hints to do scripts about this will be
welcome)
Thanks
Jesus Sandoval
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: meli@mzt.megared.net.mx
Subject: Re: Database maintenance help
In-Reply-To: <3DFA8828.629086@mzt.megared.net.mx>
References: <3DFA3D06.9080308@unboundtech.com> <28985.1039812229@sss.pgh.pa.us> <3DFA8828.629086@mzt.megared.net.mx>
* 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