Schema as versioning strategy

From: Owen Hartnett <owen(at)clipboardinc(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Schema as versioning strategy
Date: 2007-04-25 16:47:34
Message-ID: p06230900c25534883ada@[192.168.0.109]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers


Hi:

I'm a new user of Postgresql (8.2.3), and I'm very happy with both
the performance and operation of the system. My compliments to you
the many authors who keep this database running and useful.

My question is:

I want to "freeze" a snapshot of the database every year (think of
end of year tax records). However, I want this frozen version (and
all the previous frozen versions) available to the database user as
read-only. My thinking is to copy the entire public schema (which is
where all the current data lives) into a new schema, named 2007
(2008, etc.)

Is this a valid plan. I had thought of using a different database,
but that would require multiple opens. I looked to see if there were
an easy way to script doing an exact schema copy, but I haven't found
anything like it in the docs.

This is not heavy usage, nor is there a large amount of data (current
pg_dump backups are around 30 Megabytes.

Am I on the right track, or would you suggest a different strategy?

-Owen

Clipboard, Inc.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-04-25 16:48:53 Re: Vacuum-full very slow
Previous Message Tilmann Singer 2007-04-25 16:40:14 Re: Audit-trail engine: getting the application's layer user_id

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-04-25 16:48:53 Re: Vacuum-full very slow
Previous Message Jim Nasby 2007-04-25 16:40:52 Re: Improving deadlock error messages