Skip site navigation (1) Skip section navigation (2)

Re: question on warm standby

From: "Mark Steben" <msteben(at)autorevenue(dot)com>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: question on warm standby
Date: 2008-11-14 18:25:20
Message-ID: 0CB772EF23F44ED393EE5AB5F1BC0FF0@dei26g028534 (view raw or flat)
Thread:
Lists: pgsql-admin

 
 
-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us] 
Sent: Thursday, November 13, 2008 10:06 PM
To: Mark Steben
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] question on warm standby 

"Mark Steben" <msteben(at)autorevenue(dot)com> writes:
> I am running postgres 8.3.4 on master(mymachine) and slave(hummer).  I am
> attempting to implement warm standby.
>   1.  On mymachine I have the following archive_command:
>       Scp %p postgres(at)hummer:/var/backups/archlog/%f
>           (scp has been set up with ssh keys so that password
>                Is not required for postgres user)
>     This works fine.  Copies wal logs to the /var/backups/archlog
directory.

Okay ...

>   2. Before I attempt pg_standby or some other wait script on hummer I
have
>       Used a simple cp command in my recovery.conf file to manually
restore
>        My first set of updates:

>      restore_command = 'cp /var/backups/archlog/%f  %p'

This looks fine too, perfectly standard.
 
>        From the doc I am assuming that %f should be the file name(s) of
the
>         Wal log in /var/backups/archlog/ to be copied into the   
>          /*/*/*/*/pg_xlog directory referenced by %p
>         But %f seems to be referencing current wal log names in 
>          /*/*/*/*/pg_xlog.  I am getting messages like:
      
> cp: cannot stat `/var/backups/archlog/0000000600000003000000D2': 
>       No such file or directory

Are you sure that's an error?  As per the docs, the restore_command will
sometimes be asked for files that aren't there.  I'd expect one or two
such failures in a restore session.

>       0000000600000003000000D2 is an actual wal log in hummer's
>        /*/*/*/*/pg_xlog directory.

Yeah, but is it in hummer's /var/backups/archlog ?

[Mark Steben] No it's not. But there are wal logs in there 
Copied successfully from the master that I expected to be
Applied to the database and were not

			regards, tom lane


In response to

Responses

pgsql-admin by date

Next:From: Tom LaneDate: 2008-11-14 19:08:06
Subject: Re: question on warm standby
Previous:From: Julius TuskenisDate: 2008-11-14 12:37:23
Subject: Re: function executes sql 100 times longer it should

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group