pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #13450: problem about applying point-in-time recovery
2+ messages / 2 participants
[nested] [flat]

* BUG #13450: problem about applying point-in-time recovery
@ 2015-06-17 09:30 galaxyshih@gmail.com
  2015-06-18 05:27 ` Re: BUG #13450: problem about applying point-in-time recovery Guillaume Lelarge <guillaume@lelarge.info>
  0 siblings, 1 reply; 2+ messages in thread

From: galaxyshih@gmail.com @ 2015-06-17 09:30 UTC (permalink / raw)
  To: pgsql-bugs

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.


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #13450: problem about applying point-in-time recovery
  2015-06-17 09:30 BUG #13450: problem about applying point-in-time recovery galaxyshih@gmail.com
@ 2015-06-18 05:27 ` Guillaume Lelarge <guillaume@lelarge.info>
  0 siblings, 0 replies; 2+ messages in thread

From: Guillaume Lelarge @ 2015-06-18 05:27 UTC (permalink / raw)
  To: galaxyshih@gmail.com; +Cc: pgsql-bugs

Hi,

Le 17 juin 2015 4:36 PM, <galaxyshih@gmail.com> a écrit :
>
> 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.
>

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.

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2015-06-18 05:27 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-06-17 09:30 BUG #13450: problem about applying point-in-time recovery galaxyshih@gmail.com
2015-06-18 05:27 ` Guillaume Lelarge <guillaume@lelarge.info>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox