Search Postgresql Archives

Re: Archiving and recovering pg_stat_tmp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 







>
> I did the following
> 1. Enabled archiving
> 2. Executed SQL's 3. Shutdown 4. copied data directory (including the
> pgstats.stat under global) and archive directory under backup/1
> repeated 2,3,4 once more
> So now i have 2 backup directories.
> Now i created recovery.conf under backup/1/data. It has recovery command
> copying from backup1 archive.
> Next i renamed pagstat.stat under backup1/data/global  as pgstat_1.stat.
> Next i copied pgstat.stat from backup 2 into backup 1 (under the usual
> global directory).
> Pointed the server to backup1 data directory and started it. Surprisingly it
> works with no complaints about wrong pgstat.stats
>

>Do you have only one archive set up? What do you mean when you mention
>"backup1" archive?
>What kind of complaints did you see when you did in past? I am not
>aware of such errors; am I missing some?

  I am sorry for being unclear.  directories are
/backup1/data
/backup1/archive
and
/backup2/data
/backup2/archive

backup1 has data and archive directories copied after 1st shutdown
backup2 has data and archive directories copied after 2nd shutdown

Now i created recovery.conf in backup1/data and i replaced pgstats.stat from backup2 in backup1 (in data/global)
Now i start Server pointing to backup1, where it uses recovery.conf to rollback to database snapshot after first shutdown

I expected a failure because pgstats.stat do not reflect statistics of snapshot created from backup1 directory (1st shutdown) but of backup2 (2nd shutdown)

regards
Sameer



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux