Обсуждение: Two problems when using Postgresql8.3.7, Please help me!

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

Two problems when using Postgresql8.3.7, Please help me!

От
"Richard"
Дата:
1.To add live HA  to PG, I transfer WAL of a database instance(Primary node) to another database instance (standby node) at real time, and keep startup alive in standby node to recovery WAL online,so that standby node can be a hot standby.
But I got some trouble. When standby node switch to primary mode to accept connections, of course after startup initilize the WAL and exit, the postgres process ereportERROR 
when mdread function enter ERROR branch, and I got message like this "could not read block X of  relation X/X/X: read only Xof X bytes". I spent two days to figure out what happened, but it is too hard.Please help me.   
 
2. When restore data from a LIVE backup , I got message like "unexpected pageaddr %X/%X in log file %u, segment %u, offset %u" "WAL ends before end time of backup dump". It seems  the WAL was 
corrupted. I found the LSN where the error occured contained the wrong pageaddr, the pageaddr was 8K before it's real address.What was wrong? 
 
2010-08-04

Richard

Re: Two problems when using Postgresql8.3.7, Please help me!

От
"Joshua D. Drake"
Дата:
On Wed, 2010-08-04 at 00:34 +0800, Richard wrote:
> 1.To add live HA  to PG, I transfer WAL of a database instance(Primary node) to another database instance (standby
node)at real time, and keep startup alive in standby node to recovery WAL online,so that standby node can be a hot
standby.
> But I got some trouble. When standby node switch to primary mode to accept connections, of course after startup
initilizethe WAL and exit, the postgres process ereportERROR  
> when mdread function enter ERROR branch, and I got message like this
> "could not read block X of  relation X/X/X: read only Xof X bytes". I
> spent two days to figure out what happened, but it is too hard.Please
> help me.

What are you using to transfer the WAL?

Did you read this chapter?

http://www.postgresql.org/docs/8.3/static/continuous-archiving.html

Sincerely,

Joshua D. Drake

>

--
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579
Consulting, Training, Support, Custom Development, Engineering
http://twitter.com/cmdpromptinc | http://identi.ca/commandprompt

Re: Two problems when using Postgresql8.3.7, Please help me!

От
Robert Haas
Дата:
On Tue, Aug 3, 2010 at 12:34 PM, Richard <husttripper@vip.sina.com> wrote:
1.To add live HA  to PG, I transfer WAL of a database instance(Primary
node) to another database instance (standby node) at real time, and
keep startup alive in standby node to recovery WAL online,so that
standby node can be a hot standby.
>
But I got some trouble. When standby node switch to primary mode to accept connections, of course after startup initilize the WAL and exit, the postgres process ereportERROR
> when mdread function enter ERROR branch, and I got message like this "could not read block X of
>
relation X/X/X: read only Xof X bytes". I spent two days to figure out what happened, but it is too hard.Please help me.
>
>
2. When restore data from a LIVE backup , I got message like "unexpected pageaddr %X/%X in log file %u, segment %u, offset %u" "WAL ends before end time of backup dump". It seems  the WAL was
>
corrupted. I found the LSN where the error occured contained the wrong pageaddr, the pageaddr was 8K before it's real address.What was wrong?

Please see http://wiki.postgresql.org/wiki/Guide_to_reporting_problems

I recently troubleshot a problem much like the one you describe in (2)
and I believe in that case it was a bad disk subsystem that started
failing writes and didn't tell PG.  But it could also be caused by
misconfiguration.  Since you haven't given any details about your
configuration or what steps you've tried to take to resolve the
problem, it's pretty difficult to guess what's going on in your case.

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


Re: Two problems when using Postgresql8.3.7, Please helpme!

От
"Joshua D. Drake"
Дата:
On Wed, 2010-08-04 at 00:34 +0800, Richard wrote:
> 1.To add live HA  to PG, I transfer WAL of a database instance(Primary node) to another database instance (standby
node)at real time, and keep startup alive in standby node to recovery WAL online,so that standby node can be a hot
standby.
> But I got some trouble. When standby node switch to primary mode to accept connections, of course after startup
initilizethe WAL and exit, the postgres process ereportERROR 
 
> when mdread function enter ERROR branch, and I got message like this
> "could not read block X of  relation X/X/X: read only Xof X bytes". I
> spent two days to figure out what happened, but it is too hard.Please
> help me.   

What are you using to transfer the WAL?

Did you read this chapter?

http://www.postgresql.org/docs/8.3/static/continuous-archiving.html

Sincerely,

Joshua D. Drake

> 

-- 
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579
Consulting, Training, Support, Custom Development, Engineering
http://twitter.com/cmdpromptinc | http://identi.ca/commandprompt