PITR - Some data is not recovered.

From: OKADA Satoshi <okada(dot)satoshi(at)lab(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: PITR - Some data is not recovered.
Date: 2004-08-09 08:52:10
Message-ID: 200408091752.10131.okada.satoshi@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


I'm testing PITR using pgbench and postgresql ver.8.0bata.
I think that result of recovery is wrong. My test procedure
is as follows:
--------------------
I edited postgresql.conf for PITR and started the postmaster.
And I executed "pgbench -t 20000".
% pgbench -t 20000

I did backup procedure before end of pgbench.
% psql -c "SELECT pg_start_backup('label1')"
% cd $PGDATA
% tar cf /tmp/back.tar ./*
% psql -c "SELECT pg_stop_backup()"

restore and recovery
% pg_ctl stop
% cp -R $PGDATA/pg_xlog /tmp/.
% rm -rf $PGDATA/*
% cd $PGDATA
% tar xf /tmp/data.tar

create "recovery.conf" file

% rm -rf $PGDATA/pg_xlog
% cp -R /tmp/pg_xlog $PGDATA/.
% pg_ctl start

check data after recovery
% psql -c "SELECT count(*) from history"
count
-------
19999
(1 row)
------------------------
Number of records should be 20000, but result is 19999.
I found lack of data that was inserted near backup time, as a
result of comparing original "history" table and "history" table which
was recovered.
Is my backup procedure wrong?

Thanks,
Satoshi OKADA

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gaetano Mendola 2004-08-09 10:38:51 Re: Postgres development model (was Re: CVS comment)
Previous Message Christopher Kings-Lynne 2004-08-09 08:44:58 Analyze using savepoints?