pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Another PITR question
3+ messages / 3 participants
[nested] [flat]

* Another PITR question
@ 2008-10-22 20:06 Scott Whitney <swhitney@journyx.com>
  2008-10-22 20:09 ` Re: Another PITR question Alvaro Herrera <alvherre@commandprompt.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Scott Whitney @ 2008-10-22 20:06 UTC (permalink / raw)
  To: pgsql-admin

Sorry for the repetition on some of this stuff. I'm just now learning it.

So, I've got my WALs archiving just fine, and I've got my base backup.

What I'd like to do is keep the standby server in recovery mode.

Docs say:
"If we continuously feed the series of WAL files to another machine that has
been loaded with the same base backup file, we have a "hot standby" system:
at any point we can bring up the second machine and it will have a
nearly-current copy of the database."

Yep. That's what I want, alright.

So, what I have is this:

Production server:
archive command: (pseudo code): stick 'em out in the mounted dir

Recovery server:
restore command: This is where it gets dicey, to me.

If I say:
restore_command = 'cp /mnt/server/archivedir/%f %p'

it will copy all existing WAL files from the archive dir into the xlog dir,
and when I start the postmaster it will replay them. However, I want the
standby to CONSTANTLY stay in recovery mode, not just restore the WALs it
finds when I start it.

Is this possible? Can someone explain or point me to some example docs
somewhere?




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

* Re: Another PITR question
  2008-10-22 20:06 Another PITR question Scott Whitney <swhitney@journyx.com>
@ 2008-10-22 20:09 ` Alvaro Herrera <alvherre@commandprompt.com>
  2008-10-22 21:30   ` Re: Another PITR question Simon Riggs <simon@2ndQuadrant.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Alvaro Herrera @ 2008-10-22 20:09 UTC (permalink / raw)
  To: Scott Whitney <swhitney@journyx.com>; +Cc: pgsql-admin

Scott Whitney wrote:

> However, I want the standby to CONSTANTLY stay in recovery mode, not
> just restore the WALs it finds when I start it.
> 
> Is this possible? Can someone explain or point me to some example docs
> somewhere?

http://www.postgresql.org/docs/8.3/static/pgstandby.html

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.



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

* Re: Another PITR question
  2008-10-22 20:06 Another PITR question Scott Whitney <swhitney@journyx.com>
  2008-10-22 20:09 ` Re: Another PITR question Alvaro Herrera <alvherre@commandprompt.com>
@ 2008-10-22 21:30   ` Simon Riggs <simon@2ndQuadrant.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Simon Riggs @ 2008-10-22 21:30 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@commandprompt.com>; +Cc: Scott Whitney <swhitney@journyx.com>; pgsql-admin


On Wed, 2008-10-22 at 17:09 -0300, Alvaro Herrera wrote:
> Scott Whitney wrote:
> 
> > However, I want the standby to CONSTANTLY stay in recovery mode, not
> > just restore the WALs it finds when I start it.
> > 
> > Is this possible? Can someone explain or point me to some example docs
> > somewhere?
> 
> http://www.postgresql.org/docs/8.3/static/pgstandby.html

We should backpatch the docs for 8.2 also. I know we don't usually do
that but it would save some time for people.

Or at least allow comments to be added to previous doc versions.

8.3 docs have the wording

"A working example of a waiting restore_command is provided as a contrib
module named pg_standby. It should be used as a reference on how to
correctly implement the logic described above. It can also be extended
as needed to support specific configurations or environments."

-- 
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Support




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


end of thread, other threads:[~2008-10-22 21:30 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-10-22 20:06 Another PITR question Scott Whitney <swhitney@journyx.com>
2008-10-22 20:09 ` Alvaro Herrera <alvherre@commandprompt.com>
2008-10-22 21:30   ` Simon Riggs <simon@2ndQuadrant.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