could not locate required checkpoint record
いつものCentOS4.6+PostgreSQL8.3.1+VMwarePlayerを2つ使って、スタンバイDBを構築したところ、スタンバイ側が起動しない。。。pg_logにあるログを見てみると、
LOG: database system was interrupted; last known up at 2008-05-14 10:53:49 JST LOG: starting archive recovery LOG: restore_command = 'pg_standby -l -d -s 2 -t /tmp/pgsql.trigger /var/lib/pgsql/backups %f %p %r 2>>/var/lib/pgsql/s tandby.log' LOG: restored log file "000000010000000000000001.00000020.backup" from archive LOG: restored log file "000000010000000000000001" from archive LOG: WAL file is from different system DETAIL: WAL file SYSID is 5200054916662099573, pg_control SYSID is 5200044492776461819 LOG: invalid checkpoint record PANIC: could not locate required checkpoint record HINT: If you are not restoring from a backup, try removing the file "/var/lib/pgsql/data/backup_label". LOG: startup process (PID 7403) was terminated by signal 6: Aborted LOG: aborting startup due to startup process failure
なんですか、「invalid checkpoint record」って。。。
で、ログをよく見てみると
HINT: If you are not restoring from a backup, try removing the file "/var/lib/pgsql/data/backup_label".
とあるので、確認してみると、
$ ls /var/lib/pgsql/data/backup_label /var/lib/pgsql/data/backup_label $ cat backup_label START WAL LOCATION: 0/1000020 (file 000000010000000000000001) CHECKPOINT LOCATION: 0/1000020 START TIME: 2008-05-14 11:29:33 JST LABEL: Label $
ベースバックアップを取ったときに作られるファイルでした。で、これを
$ rm /var/lib/pgsql/data/backup_label
$
してやると、問題なく起動。あー、びっくりした。
拙作パッケージをまとめて更新
といっても、PEAR::HTTP_Requestの推奨バージョンを外しただけですが。。。
- Services_FeedMeter-0.1.2(PEAR::Services_FeedMeter作ってみた - Do You PHP はてな)
- Services_Hatena_Favorites-0.0.2(はてスタのお気に入りAPIのPEARパッケージを作ってみた - Do You PHP はてな)
- Services_Hatena_Star-0.0.3(PEAR::Services_Hatena_Star作ってみた - Do You PHP はてな)
- Services_MixiAPI-0.1.2(mixiのAPIが増えていたので、Services_MixiAPI作ってみた - Do You PHP はてな)
- Services_Muboh-0.1.1(Services_Muboh 0.1.0リリース - Do You PHP はてな)
- Services_Recruit_Abroad-0.0.2(PEAR::Services_Recruit_Abroad作ってみた - Do You PHP はてな)
- Services_Recruit_Akasugu-0.0.2(PEAR::Services_Recruit_Akasugu作ってみた - Do You PHP はてな)
インストール、アップグレードは
$ sudo pear install -af http://www.doyouphp.jp/pear/[パッケージ+バージョン].tgz $ sudo pear upgrade http://www.doyouphp.jp/pear/[パッケージ+バージョン].tgz
な感じで。