Thread: okay so i deleted pg_log .....

okay so i deleted pg_log .....

From
Steve Brett
Date:
indeed i did.

the database had run from 18 months with zero downtime and i (stupidly)
mistook pg_log for the log file and truncated it.

after the initial panic and frantic phonecals around the company we decided
to upgrade to 7.2 and restore from a backup (thankfully we only lost 30 mins
of data and it was around lunchtime so we were ok).

anyways, the question is thus.

is there any way to restore pg_log and is this file a file we should
consider backing up ?

currently i have a cron job that does a pg_dump every 4 hours and the files
are then copied to a remote windoze box that backs up to tape.

also, is there a way to restore or rebuild pg_log ?

many thanks,


Steve Brett



Re: okay so i deleted pg_log .....

From
Tom Lane
Date:
Steve Brett <SBrett@e-mis.com> writes:
> is there any way to restore pg_log and is this file a file we should
> consider backing up ?
> currently i have a cron job that does a pg_dump every 4 hours and the files
> are then copied to a remote windoze box that backs up to tape.

pg_log is not very useful by itself.  I think your existing backup
strategy is fine, assuming you can afford loss of up to 4 hours of data.

There is work going on to support incremental backup approaches, but
it's not available yet.

            regards, tom lane