Обсуждение: BUG #13450: problem about applying point-in-time recovery

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

BUG #13450: problem about applying point-in-time recovery

От
galaxyshih@gmail.com
Дата:
The following bug has been logged on the website:

Bug reference:      13450
Logged by:          Leo
Email address:      galaxyshih@gmail.com
PostgreSQL version: Unsupported/Unknown
Operating system:   Debian
Description:

Hello,

Recently, I am applying point-in-time recovery and I tried to combine it
with full backup(simply tar the whole data). However I encountered some
problems. Here is my scenario:
T1: simply tar a base file(named b1)(/path/to/cluster_data, at this time, I
do not enable WAL)
T2: enable WAL (modify postgres.conf and restart postgres)
T3: tar a base file again (named b2)
T4, T5: insert some data to my database
T6: perform restore (untar the base, overwrite the files to
/path/to/cluster_data, create recover.conf if needed)

Everything is fine if I restore to T2-T5. But here is my problem: if I
restore to T1 first(untar b1 and overwrite the files to
/path/to/cluster_data), then I cannot successfully restore to T2-T5. I will
receive some message in the log:

2015-06-15 20:57:44 GMT+8 LOG:  restored log file
"00000001000000000000002E.00000020.backup" from archive
2015-06-15 20:57:44 GMT+8 LOG:  restored log file "00000001000000000000002E"
from archive
2015-06-15 20:57:44 GMT+8 LOG:  unexpected pageaddr 0/2A000000 in log file
0, segment 46, offset 0
2015-06-15 20:57:44 GMT+8 LOG:  invalid checkpoint record
2015-06-15 20:57:44 GMT+8 FATAL:  could not locate required checkpoint
record
2015-06-15 20:57:44 GMT+8 HINT:  If you are not restoring from a backup, try
removing the file "/home/genie/db_mount_point/backup_label".
2015-06-15 20:57:44 GMT+8 LOG:  startup process (PID 30139) exited with exit
code 1
2015-06-15 20:57:44 GMT+8 LOG:  aborting startup due to startup process
failure

I do not know the problem exactly. Is that my way of applying it is
completely wrong? I thought that I could use these two ways of restore. When
I try to restore to T1, it should extract the files from b1. The same
procedure applies to restore T2 except the part of replaying the WALs. Can
somebody give me some suggestion, please.

Re: BUG #13450: problem about applying point-in-time recovery

От
Guillaume Lelarge
Дата:
Hi,

Le 17 juin 2015 4:36 PM, <galaxyshih@gmail.com> a =C3=A9crit :
>
> The following bug has been logged on the website:
>
> Bug reference:      13450
> Logged by:          Leo
> Email address:      galaxyshih@gmail.com
> PostgreSQL version: Unsupported/Unknown
> Operating system:   Debian
> Description:
>
> Hello,
>
> Recently, I am applying point-in-time recovery and I tried to combine it
> with full backup(simply tar the whole data). However I encountered some
> problems. Here is my scenario:
> T1: simply tar a base file(named b1)(/path/to/cluster_data, at this time,
I
> do not enable WAL)
> T2: enable WAL (modify postgres.conf and restart postgres)
> T3: tar a base file again (named b2)
> T4, T5: insert some data to my database
> T6: perform restore (untar the base, overwrite the files to
> /path/to/cluster_data, create recover.conf if needed)
>
> Everything is fine if I restore to T2-T5. But here is my problem: if I
> restore to T1 first(untar b1 and overwrite the files to
> /path/to/cluster_data), then I cannot successfully restore to T2-T5. I
will
> receive some message in the log:
>
> 2015-06-15 20:57:44 GMT+8 LOG:  restored log file
> "00000001000000000000002E.00000020.backup" from archive
> 2015-06-15 20:57:44 GMT+8 LOG:  restored log file
"00000001000000000000002E"
> from archive
> 2015-06-15 20:57:44 GMT+8 LOG:  unexpected pageaddr 0/2A000000 in log fil=
e
> 0, segment 46, offset 0
> 2015-06-15 20:57:44 GMT+8 LOG:  invalid checkpoint record
> 2015-06-15 20:57:44 GMT+8 FATAL:  could not locate required checkpoint
> record
> 2015-06-15 20:57:44 GMT+8 HINT:  If you are not restoring from a backup,
try
> removing the file "/home/genie/db_mount_point/backup_label".
> 2015-06-15 20:57:44 GMT+8 LOG:  startup process (PID 30139) exited with
exit
> code 1
> 2015-06-15 20:57:44 GMT+8 LOG:  aborting startup due to startup process
> failure
>
> I do not know the problem exactly. Is that my way of applying it is
> completely wrong? I thought that I could use these two ways of restore.
When
> I try to restore to T1, it should extract the files from b1. The same
> procedure applies to restore T2 except the part of replaying the WALs. Ca=
n
> somebody give me some suggestion, please.
>

First suggestion, this isn't a bug. You have an issue using pitr, it should
go to another mailing list, like pgsql-general or pgsql-admin.

Second suggestion. While you write your email to the other mailing lists,
give more details on what you copied and how you copied it. Was it the
whole data directory or a sub directory? Was PostgreSQL shutdown or did you
use pg_start_backup/pg_stop_backup?

Regards.