Re: backup database by cloning itself

From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: backup database by cloning itself
Date: 2007-02-14 20:46:09
Message-ID: 45D37511.5020603@cox.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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-----

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John D. Burger 2007-02-14 20:59:03 Recover anything from dropped database?
Previous Message Mikko Partio 2007-02-14 20:37:36 Re: Cast record as text