From: | Patrick B <patrickbakerbr(at)gmail(dot)com> |
---|---|
To: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Turning slave into a master - PostgreSQL 9.2 |
Date: | 2016-10-31 20:46:35 |
Message-ID: | CAJNY3iujmnW1Xa=XGS=NKbc3L2C_bNuXi7b-ZtDEXMYkutRgZQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi guys,
I got a test server, let's call it test01.
The test01 has a basebackup from the master.
I want to turn test01 into a master. It doesn't need to catch up with the
wal_files, because I don't need it to be up-to-date.
So what I did is:
- Replaced /var/lib/pgsql/9.2/data/ with the basebackup
- Created recovery.conf:
restore_command = 'cp /var/lib/pgsql/wal_archive/%f %p'
recovery_target_timeline = 'latest'
standby_mode = off
trigger_file = '/tmp/pg_failover_trigger'
- touch /tmp/pg_failover_trigger
- service postgresql start
And then postgres starts recovering the wal_files. But I don't want that..
as I don't need a up-to-date
Is the wal_files required anyway?
Patrick
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2016-10-31 21:33:18 | Re: Turning slave into a master - PostgreSQL 9.2 |
Previous Message | Evan Martin | 2016-10-31 20:41:17 | Re: Way to quickly detect if database tables/columns/etc. were modified? |