pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
PITR warm-standby with 8.2 setup questions
2+ messages / 2 participants
[nested] [flat]

* PITR warm-standby with 8.2 setup questions
@ 2008-01-10 19:27 David Wall <d.wall@computer.org>
  2008-01-10 23:08 ` Re: PITR warm-standby with 8.2 setup questions Kevin Kempter <kevin@kevinkempterllc.com>
  0 siblings, 1 reply; 2+ messages in thread

From: David Wall @ 2008-01-10 19:27 UTC (permalink / raw)
  To: pgsql-admin

I'm trying to get WAL file copying working across two systems.  It seems 
pretty straightforward to handle this in the "archive_command" of the 
primary, in which I am able to copy the files easily to a staging area 
for the backup system.

On the backup system, I have the recovery.conf pointing to my script, 
but I have a few questions on how that program should behave, and 
whether I'd be much wiser to just use pg_standby instead of my own script.

1) I do not want to give the backup PG a file unless it's a "complete" 
file.  I don't want to give it one that is currently in the middle of 
being transferred from the primary to the backup system (or a backup 
copy that failed in the middle).  Most of my files are 16777216 bytes, 
so I initially checked that size.  But I found that there are files with 
a name like '0000000100000002000000DC.00000020.backup' that is only 272 
bytes.  Will that file also need to be given to PG recovery, and if so, 
how are most determining if a small file is complete or just a partial 
from the copy?

2) On the recovery side, the %p and %f values are giving me %p of 
'pg_xlog/RECOVERYXLOG' and %f of '0000000100000003000000B1'.  Can I 
confirm that this means my recover program should find a file named 
'0000000100000003000000B1' in my backup system's WAL archive and copy it 
to the file named 'pg_xlog/RECOVERYXLOG', or should I put it into 
'pg_xlog/0000000100000003000000B1'?

3) On the backup PG, is it correct that I have to remove backup_label, 
postmaster.pid and pg_xlog if they are part of the or TAR backup from 
the primary's PGDATA area?

Thanks,
David

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: PITR warm-standby with 8.2 setup questions
  2008-01-10 19:27 PITR warm-standby with 8.2 setup questions David Wall <d.wall@computer.org>
@ 2008-01-10 23:08 ` Kevin Kempter <kevin@kevinkempterllc.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Kevin Kempter @ 2008-01-10 23:08 UTC (permalink / raw)
  To: pgsql-admin

On Thursday 10 January 2008 12:27:37 David Wall wrote:
> I'm trying to get WAL file copying working across two systems.  It seems
> pretty straightforward to handle this in the "archive_command" of the
> primary, in which I am able to copy the files easily to a staging area
> for the backup system.
>
> On the backup system, I have the recovery.conf pointing to my script,
> but I have a few questions on how that program should behave, and
> whether I'd be much wiser to just use pg_standby instead of my own script.

If you're on 8.2 I'd use pg_sdtandby just because it's "actively" managed- 
although I've written my own as well. It's pretty straight forward

>
> 1) I do not want to give the backup PG a file unless it's a "complete"
> file.  I don't want to give it one that is currently in the middle of
> being transferred from the primary to the backup system (or a backup
> copy that failed in the middle).  Most of my files are 16777216 bytes,
> so I initially checked that size.  But I found that there are files with
> a name like '0000000100000002000000DC.00000020.backup' that is only 272
> bytes.  Will that file also need to be given to PG recovery, and if so,
> how are most determining if a small file is complete or just a partial
> from the copy?

all the WAL segments in the target WAL archive dir from your 'master' are 
complete. They don't get archived until the file is complete. The .backup 
file is from a pg_start_backup() which tells postgres where a file system 
backup was done

>
> 2) On the recovery side, the %p and %f values are giving me %p of
> 'pg_xlog/RECOVERYXLOG' and %f of '0000000100000003000000B1'.  Can I
> confirm that this means my recover program should find a file named
> '0000000100000003000000B1' in my backup system's WAL archive and copy it
> to the file named 'pg_xlog/RECOVERYXLOG', or should I put it into
> 'pg_xlog/0000000100000003000000B1'?

Generally you want to push the files into a "source" WAL dir and specify this 
source path in the recovery.conf file - don't copy the files into pg_xlog or 
pg_xlog/RECOVERYLOG yourself, the engine will do it as needed

>
> 3) On the backup PG, is it correct that I have to remove backup_label,
> postmaster.pid and pg_xlog if they are part of the or TAR backup from
> the primary's PGDATA area?

AFAIK you only need to remove the pid file and p_xlog/*


>
> Thanks,
> David





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2008-01-10 23:08 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-01-10 19:27 PITR warm-standby with 8.2 setup questions David Wall <d.wall@computer.org>
2008-01-10 23:08 ` Kevin Kempter <kevin@kevinkempterllc.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox