Re: warning message in standby - Mailing list pgsql-hackers

From Robert Haas
Subject Re: warning message in standby
Date
Msg-id AANLkTimS7VRrPYhQW2pDJrhSuusJT8sXah0tJcYCKogv@mail.gmail.com
Whole thread Raw
In response to Re: warning message in standby  (Greg Stark <gsstark@mit.edu>)
List pgsql-hackers
On Thu, Jun 10, 2010 at 12:49 PM, Greg Stark <gsstark@mit.edu> wrote:
> On Thu, Jun 10, 2010 at 5:13 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>> At this point you should have a working HS/SR setup.  Now:
>>
>> 8. shut the slave down
>> 9. move recovery.conf out of the way
>> 10. restart the slave - it will do recovery and enter normal running
>> 11. make some database changes
>> 12. stop the slave
>> 13. put recovery.conf back
>> 14. restart the slave
>> 15. make a bunch of changes on the master
>>
>> When the slave then tries to replay, you then get something like:
>>
>> WARNING:  invalid record length at 0/4005330
>> WARNING:  invalid record length at 0/4005330
>> WARNING:  invalid record length at 0/4005330
>>
>
> Woah, why does this procedure lead to this situation? I would hope
> there's nothing a user could do which would cause it short of invoking
> dd to corrupt the WAL files.
>
> At precisely which step of the procedure did the user do something
> wrong?

13.

> Is there any reason we can't detect that they've done it and
> throw a specific error message saying the configuration is invalid?

I'm not sure how we'd go about doing that, but I agree it would be nice.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: warning message in standby
Next
From: Magnus Hagander
Date:
Subject: Re: Error with GIT Repository