LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-25-2008, 02:18 PM   #1
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Postgresql Warm standby problem - WAL didn't replay...


Hello all,

I have installed postgres on two machines. Both are similar machines and both are running postgresql 8.3.3.

I set up one in archive mode and the other in recovery mode and have set up the copying the WAL archive "push" to the other machine as described here...

http://www.postgresql.org/docs/8.3/i...archiving.html

I did a test and added a table with some entries...waited about an hour...made sure the WAL archives got pushed over to the other server; then I stopped the primary. I then brought up the warm standby and I waited until the recovery.conf file changed to recovery.done.

I logged into the database and the table wasn't there

I seems that the WAL didn't replay...The database was only as recent as the last pg_dump....

Thoughts/Suggestions/Questions?

Thanks,

-C
 
Old 06-26-2008, 10:22 AM   #2
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979

Original Poster
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Solved

Hello all,

After digging through the logs I found out my problem...I appearers that the transaction ID wasn't the same.

To solve it; I make a "hot backup" following this
http://www.postgresql.org/docs/8.3/i...UP-BASE-BACKUP

Then I tar-ed up the data directory as described here...
http://www.postgresql.org/docs/8.3/i...ckup-file.html

Then I moved the tar-ed datadir and scp-ed it over to the standby database server and untar-ed the tar-ed file in the appropriate location and statred up postgres in "standby mode (continuous recovery)" and I tested the failover mechanism and the database was up to date...

Hope this helps!

-C
 
Old 06-27-2008, 04:03 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Congratulations on resolving the issue, and thanks for
updating the thread with the resolution.



Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Going into standby for warm swap litlmary Linux - Laptop and Netbook 0 06-08-2005 03:32 PM
replay failure spooge Slackware 3 06-02-2005 09:14 AM
PostgreSQL 8 WAL archiving trevelluk Linux - Software 1 02-17-2005 09:42 AM
Standby Problem irfanhab Slackware 7 05-10-2004 12:27 PM
postgresql -odbc & postgresql-jdbc installation kjsubbu Linux - Software 0 06-19-2003 02:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration