Question about timelines

From: Torsten Förtsch <torsten(dot)foertsch(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Question about timelines
Date: 2015-07-29 05:46:59
Message-ID: 55B868D3.1090408@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

we have a complex structure of streaming replication (PG 9.3) like:

master --> replica1
|
+-----> replica2 --> replica21
|
+------> replica22 --> replica221

Now I want to retire master and make replica2 the new master:

+------> replica1
|
replica2 --> replica21
|
+------> replica22 --> replica221

replica2 is currently a synchronous replica.

If I "promote" replica2 a new timeline is created. Hence, I have to
instruct all other replicas to follow that new timeline
(recovery_target_timeline = 'latest' in recovery.conf).

On the other hand, since replica2 is synchronous it should have all
transactions when master is shut down. So, I am thinking do I really
need a new timeline? Can't I just remove recovery.conf on replica2 and
restart it as a master. The only thing I then have to do is to point
replica1 to it.

Is that a way to go? If "promoting" is better than why?

Thanks,
Torsten

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Haribabu Kommi 2015-07-29 06:28:11 Re: Question about timelines
Previous Message hamann.w 2015-07-29 05:17:44 Re: [SOLVED] running script on the server