Re: Help setting up warm standby replication

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "Nico Sabbi" <nsabbi(at)officinedigitali(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Help setting up warm standby replication
Date: 2007-04-16 14:35:05
Message-ID: b42b73150704160735o3259f2e7h660cc9988c55dfba@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 4/16/07, Nico Sabbi <nsabbi(at)officinedigitali(dot)it> wrote:
> Merlin Moncure wrote:
>
> > On 4/16/07, Nico Sabbi <nsabbi(at)officinedigitali(dot)it> wrote:
> >
> >> Is there any parameter that I have to pass to the second server to keep
> >> on requesting WALs?
> >> I still don't understand what instructs the server to continously
> >> request the master's logs.
> >
> >
> > google pg_standby. I've set it up and it works.
> >
> > merlin
> >
>
> Hi,
> I installed the second version of pg_standby.tar that you posted here.
>
> In recovery.conf I set
> restore_command = '/usr/local/bin/pg_standby -d -c -s 5 -w 0 /tmp/pg/ %f %p'
>
> and I see in the log file that something goes on after every update:
>
> Trigger file : (null)
> Waiting for WAL file : /tmp/pg//000000010000000000000021
> WAL file path : 000000010000000000000021
> Restoring to... : pg_xlog/RECOVERYXLOG
> Sleep interval : 5 seconds
> Max wait interval : 0 forever
> Command for restore : cp /tmp/pg//000000010000000000000021
> pg_xlog/RECOVERYXLOG
> running restore : success
> LOG: restored file "000000010000000000000021" from archivio
>
>
> but "cp /tmp/pg//000000010000000000000021 pg_xlog/RECOVERYXLOG" looks
> suspicious to me.
>
> Is it expected? should WAL files overwrite pg_xlog/RECOVERYXLOG ?
> If I stop the replication and start the slave after having removed the
> recovery.conf
> the server doesn't come up:
>
> LOG: aborting startup due to startup process failure
> LOG: database system was interrupted while in recovery at log time
> 2007-04-16 15:29:42 CEST
> HINT: If this has occurred more than once some data may be corrupted
> and you may need to choose an earlier recovery target.
> LOG: impossibile aprire il file "pg_xlog/000000010000000000000009"
> (file registro 0, segmento 9): No such file or directory
> LOG: invalid primary checkpoint record
> LOG: impossibile aprire il file "pg_xlog/000000010000000000000021"
> (file registro 0, segmento 33): No such file or directory
> LOG: invalid secondary checkpoint record
> PANIC: impossibile localizzare un checkpoint record valido
> LOG: startup process (PID 10824) was terminated by signal 6
> LOG: aborting startup due to startup process failure
>
>
> infact pg_xlog/ of the slave contains only RECOVERHISTORY:
>
> cat pg_xlog/RECOVERYHISTORY
> START WAL LOCATION: 0/9000020 (file 000000010000000000000009)
> STOP WAL LOCATION: 0/A000000 (file 00000001000000000000000A)
> CHECKPOINT LOCATION: 0/9000020
> START TIME: 2007-04-16 15:29:42 CEST
> LABEL: label
> STOP TIME: 2007-04-16 15:31:39 CEST
>
> Did I do something wrong?
> Thanks for your help,

try link mode, not copy mode (-l). make sure you read about the -k switch.

merlin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kevin Murphy 2007-04-16 14:52:35 Re: Q re installing Pg on OS X?
Previous Message Nico Sabbi 2007-04-16 14:21:14 Re: Help setting up warm standby replication