From: | Scott Whitney <scott(at)journyx(dot)com> |
---|---|
To: | Dave Johansen <davejohansen(at)gmail(dot)com>, Vicky Soni - Quipment India <vicky(dot)soni(at)quipment(dot)nl> |
Cc: | "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: PITR Setup Using Hot StandBy |
Date: | 2016-05-24 15:48:10 |
Message-ID: | BY1PR11MB0390CA46582FF19C8D119523A74F0@BY1PR11MB0390.namprd11.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi, Dave.
It depends on what you're trying to do.
If you want a slave up in real-time replication mode, that's by far the simplest setup.
The concept is:
1) start a backup
select pg_start_backup("myslave"),true);
2) Rsync (or tar) your pg data directory over to your slave.
3) select pg_stop_backup();
4) Tell your slave how to connect to the master
Start your slave.
This is a pretty straight-forward link for this:
https://opensourcedbms.com/dbms/how-to-do-point-in-time-recovery-with-postgresql-9-2-pitr-3/
[https://opensourcedbms.com/dbms/wp-content/uploads/2013/02/Image-0016.png]<https://opensourcedbms.com/dbms/how-to-do-point-in-time-recovery-with-postgresql-9-2-pitr-3/>
How to do point in time recovery with PostgreSQL 9.2 ...<https://opensourcedbms.com/dbms/how-to-do-point-in-time-recovery-with-postgresql-9-2-pitr-3/>
opensourcedbms.com
This post describes how to do point in time recovery with PostgreSQL 9.2 : PITR. Point in time recovery (PITR) simply means restoring data upto certain point in time.
If you want to do something "clever," like offset how far behind the slave is, that's more complex.
________________________________
From: pgsql-admin-owner(at)postgresql(dot)org <pgsql-admin-owner(at)postgresql(dot)org> on behalf of Dave Johansen <davejohansen(at)gmail(dot)com>
Sent: Tuesday, May 24, 2016 10:31 AM
To: Vicky Soni - Quipment India
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] PITR Setup Using Hot StandBy
On Tue, May 24, 2016 at 6:05 AM, Vicky Soni - Quipment India <vicky(dot)soni(at)quipment(dot)nl<mailto:vicky(dot)soni(at)quipment(dot)nl>> wrote:
[Quipment Logo]
Hello Friends,
I need to setup PITR. Using master, I am able to do wal archiving.
But using slave I am not able to archive WAL files.
Can anyone please guide me, how to setup PITR using Hot StandBy?
I have setup LogShpping + Streaming Replication in my dev environment, now using this slave I want to setup PITR.
I have already setup following parameters:
wal_level = hot_standby
archive_mode = on
archive_command = 'copy "c:\\Program Files\\PostgreSQL\\9.4\\data\\%p" "\\\\192.168.170.221\\Primary_WAL_Archive\\%f"'
max_wal_senders = 3
wal_keep_segments = 8
hot_standby = on
Any help is appreciated.
http://www.postgresql.org/docs/9.2/static/continuous-archiving.html
The standby/slave is read only and does not generate WAL files (it only consumes them to stay in sync with the master).
Journyx, Inc.
7600 Burnet Road #300
Austin, TX 78757
www.journyx.com
p 512.834.8888
f 512-834-8858
Do you receive our promotional emails? You can subscribe or unsubscribe to those emails at http://go.journyx.com/emailPreference/e/4932/714/
From | Date | Subject | |
---|---|---|---|
Next Message | Hoai Nam | 2016-05-24 15:56:47 | Re: The problem is related to concurrent resquests |
Previous Message | Dave Johansen | 2016-05-24 15:31:20 | Re: PITR Setup Using Hot StandBy |