Re: backup database by cloning itself - Mailing list pgsql-general

From Ron Johnson
Subject Re: backup database by cloning itself
Date
Msg-id 45D37511.5020603@cox.net
Whole thread Raw
In response to Re: backup database by cloning itself  ("Ted Byers" <r.ted.byers@rogers.com>)
Responses Re: backup database by cloning itself  ("Webb Sprague" <webb.sprague@gmail.com>)
List pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/14/07 13:40, Ted Byers wrote:
>> Maybe his real goal "all the backups readily available to be read by
>> my program (opening the backup read only)" is to have a historical
>> record of what certain records looked like in the past.
>>
>> There are other ways of doing that, though.
>>
>
> If your speculation is right, perhaps the OP ought to explain a little
> more fully why he needs 24 snapshots a day, or indeed any at all.
>
> It seems to me that if you really want a historical record of what
> certain tables looked like in the past, it would be smarter and more
> accurate to create triggers, for each possible operation, that store the
> relevant details in an audit table including especially who made the
> edits and when. This strikes me as being much less work than developing
> code that processes so many backups.

I dunno about that.  We use triggers to populate log tables that get
extracted, truncated then loaded into a reporting db every night.
Because of the night time batch cycle, there is no quiescent time to
do this, so we have 2 log tables, and the triggers alternate which
log table to insert into, depending on whether the day number is
even or odd.

That's in addition to the trigger logic to insert into history tables.

It's a royal pain.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFF03URS9HxQb37XmcRAq0RAJ4iAHtbst+Gq9QndTr36lErYUwSmgCg7dM/
luIRI+F9eqYqUoMz9VNNaNc=
=NYOz
-----END PGP SIGNATURE-----

pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Best practice for 8.1.5 -> 8.2 migration - with big database?
Next
From: "John D. Burger"
Date:
Subject: Recover anything from dropped database?