Обсуждение: 8.2.15 pitr/00000001.history

Поиск
Список
Период
Сортировка

8.2.15 pitr/00000001.history

От
Ray Stell
Дата:
While testing an 8.2.15 pitr procedure I see this postmaster log entry on startup of the
recovered cluster:

 2010-03-24 12:38:36.357 EDT,,3,,, LOG:  restore_command = "cp /home/postgresql/fms/wals/%f %p"
   cp: cannot stat `/home/postgresql/fms/wals/00000001.history': No such file or directory

pg goes on to restore from other wal segments, but I wonder if someone could explain
the significance of this history file?  Should I have such a file?

Also, are there objects I can query to check the current cluster status compared to the
beginning of the recovery for such things as next transaction ID, next OID, checkpoint record,
and redo record?

2010-03-24 12:38:36.438 EDT,,6,,, LOG:  checkpoint record is at 28/D9000020
2010-03-24 12:38:36.438 EDT,,7,,, LOG:  redo record is at 28/D9000020; undo record is at 0/0; shutdown FALSE
2010-03-24 12:38:36.438 EDT,,8,,, LOG:  next transaction ID: 0/9160987; next OID: 16874

Thanks.

Re: 8.2.15 pitr/00000001.history

От
Ray Stell
Дата:
On Wed, Mar 24, 2010 at 01:10:31PM -0400, Ray Stell wrote:
>  2010-03-24 12:38:36.357 EDT,,3,,, LOG:  restore_command = "cp /home/postgresql/fms/wals/%f %p"
>    cp: cannot stat `/home/postgresql/fms/wals/00000001.history': No such file or directory

patience, young padawan:

2010-03-24 12:38:47.028 EDT,,31,,, LOG:  restored log file "0000000100000028000000EA" from archive
cp: cannot stat `/home/postgresql/fms/wals/00000002.history': No such file or directory
2010-03-24 12:38:47.032 EDT,,32,,, LOG:  selected new timeline ID: 2
cp: cannot stat `/home/postgresql/fms/wals/00000001.history': No such file or directory
2010-03-24 12:38:47.876 EDT,,33,,, LOG:  archive recovery complete
2010-03-24 12:38:49.478 EDT,,34,,, LOG:  database system is ready
2010-03-24 12:38:49.520 EDT,,1,,, LOG:  archived transaction log file "00000002.history"

src/backend/access/transam/xlog.c
        /*
         * Consider whether we need to assign a new timeline ID.
         *
         * If we are doing an archive recovery, we always assign a new ID.

Re: 8.2.15 pitr/00000001.history

От
Bruce Momjian
Дата:
Ray Stell wrote:
> On Wed, Mar 24, 2010 at 01:10:31PM -0400, Ray Stell wrote:
> >  2010-03-24 12:38:36.357 EDT,,3,,, LOG:  restore_command = "cp /home/postgresql/fms/wals/%f %p"
> >    cp: cannot stat `/home/postgresql/fms/wals/00000001.history': No such file or directory
>
> patience, young padawan:
>
> 2010-03-24 12:38:47.028 EDT,,31,,, LOG:  restored log file "0000000100000028000000EA" from archive
> cp: cannot stat `/home/postgresql/fms/wals/00000002.history': No such file or directory
> 2010-03-24 12:38:47.032 EDT,,32,,, LOG:  selected new timeline ID: 2
> cp: cannot stat `/home/postgresql/fms/wals/00000001.history': No such file or directory
> 2010-03-24 12:38:47.876 EDT,,33,,, LOG:  archive recovery complete
> 2010-03-24 12:38:49.478 EDT,,34,,, LOG:  database system is ready
> 2010-03-24 12:38:49.520 EDT,,1,,, LOG:  archived transaction log file "00000002.history"
>
> src/backend/access/transam/xlog.c
>         /*
>          * Consider whether we need to assign a new timeline ID.
>          *
>          * If we are doing an archive recovery, we always assign a new ID.

There is also change in 9.0:

    Fix longstanding gripe that we check for 0000000001.history at start of
    archive recovery, even when we know it is never present.

so you should not see this when using >= PG 9.0.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  PG East:  http://www.enterprisedb.com/community/nav-pg-east-2010.do