changing server roles in streaming replication I want to implement streaming replication using postgresql-9.2.4 in my reporting application.  I came stuck on the below scenario.


create master and slave with synchronous replication which is working fine.
then I brought down master and brought up slave as master using trigger file on slave side manually.
fired log in new master which is working fine.


Now my question is that how can I bring up the old master as slave so that it points to new master without taking base backup or using rsync?

My reporting application will contain large data (approx 50 TB) and more. If I take base backup or rsync feature it will surely take more time to sync old master to new master .

Is there any other way or third party tool which help me to avoid base backup?
Unforutnatley, you cannot do this without taking a new base backup. This is something being worked on, but at this point repointing the slave is not supported.

There exists a tool called pg_rewind, but there are definite cornercases where that one does not work properly, so it's quite a risky way.

For now, doing a basebackup/rsync is the supported method for this.