Re: WAL Log Shipping - Warm Standby not working under 8.3.7

From: Keaton Adams <kadams(at)mxlogic(dot)com>
To: V S P <pgsql-general(at)postgresql(dot)org>
Subject: Re: WAL Log Shipping - Warm Standby not working under 8.3.7
Date: 2010-01-09 15:24:45
Message-ID: C76DEDCD.14599%kadams@mxlogic.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

We are still on PG 8.3.7 and I don't see pg_standby. It looks like it was added with 8.3.8. I will put in a request to update to 8.3.9 as a part of our next software upgrade (internal product we write) but for now I need to try to figure out why this isn't working under 8.3.7. I did manage to bring up replication under 8.3.7 in the test environment just fine, so the question is now why the standby PG instance won't come up in recovery mode and why it is looking so far back for the next WAL log file.

-K

On 1/8/10 5:55 PM, "Erik Jones" <ejones(at)engineyard(dot)com> wrote:

On Jan 8, 2010, at 4:50 PM, Erik Jones wrote:

>
> On Jan 8, 2010, at 9:50 AM, Keaton Adams wrote:
>
>> OK,
>>
>> So what am I doing wrong here?
>>
>> Installed PG 8.3.7 on Slave machine
>>
>> Restored from last evening's backup from the master DB to make the rsync across the network finish sooner.
>>
>> Shut down the PG instance on the slave machine
>>
>> Ran a script that does the following:
>>
>> select pg_start_backup('Master_Backup');
>> rsync -rvlpogtz ${masterdb}/* ${slave_dbuser}(at)${slave_host}:${slavedb}
>> select pg_stop_backup();
>> ssh ${slave_dbuser}(at)${slave_host} rm ${slavedb}/postmaster.pid 2>/dev/null
>> ssh ${slave_dbuser}(at)${slave_host} rm ${slave_backup_path}/0* 2>/dev/null
>> ssh ${slave_dbuser}(at)${slave_host} ${PSQL_BIN}/pg_ctl -D ${slavedb} -l logfile start
>
> Is ${slave_backup_path} your archive directory? Why are you deleting all of you archives there?

Also, what are the contents of your recovery.conf file? Are you using pg_standby? The typical setup is to clear <datadir>/pg_xlog on your standby and use pg_standby to recovery files directly from your archive directory?

Erik Jones, Database Administrator
Engine Yard
Support, Scalability, Reliability
866.518.9273 x 260
Location: US/Pacific
IRC: mage2k

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-01-09 16:39:42 Re: set-level update fails with unique constraint violation
Previous Message Amy Smith 2010-01-09 15:23:54 postgres