Re: Re: [BUGS] BUG #4796: Recovery followed by backup creates unrecoverable WAL-file
От | Heikki Linnakangas |
---|---|
Тема | Re: Re: [BUGS] BUG #4796: Recovery followed by backup creates unrecoverable WAL-file |
Дата | |
Msg-id | 4A0304E0.8050301@enterprisedb.com обсуждение исходный текст |
Ответ на | Re: Re: [BUGS] BUG #4796: Recovery followed by backup creates unrecoverable WAL-file (Simon Riggs <simon@2ndQuadrant.com>) |
Ответы |
Re: Re: [BUGS] BUG #4796: Recovery followed by
backup creates unrecoverable WAL-file
|
Список | pgsql-hackers |
Simon Riggs wrote: > On Thu, 2009-05-07 at 17:54 +0300, Heikki Linnakangas wrote: >> Simon Riggs wrote: >>> A more useful thing might be to do an xlog switch before we do the >>> shutdown checkpoint at end of recovery. That gives the same sequence of >>> actions without modifying the existing sequence of activities for >>> backups, which is delicate enough for me to not want to touch it. >> >> Hmm, yeah should work as well. I find the recovery sequence to be even >> more delicate, though, than pg_start_backup(). I think you'd need to >> write the XLOG switch record using the old timeline ID, as we currently >> require that the timeline changes only at a shutdown checkpoint record. >> That's not hard, but does make me a bit nervous. > > Yes, you're right about the delicacy of all of this so both suggestions > sound kludgey - the problem is to do with timelines not with sequencing > of checkpoints and log switches. The problem is Mikael deleted the > history file and he shouldn't have done that. I don't see any user error here. What he did was: 1. Restore from backup A 2. Clear old WAL archive 3. pg_start_backup() + tar all but pg_xlog + pg_stop_backup(); 4. Restore new backup B There's no history file in the archive because it was cleared in step 2. There's nothing wrong with that; you only need to retain WAL files from the point that you call pg_start_backup(). There's no history file either in the tar, because pg_xlog was not tarred as we recommend in the manual. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: