Re: Live steraming replication setup issue!

From: Ashish Chauhan <Ashish(dot)Chauhan(at)support(dot)com>
To: Andreas Kretschmer <andreas(at)a-kretschmer(dot)de>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Live steraming replication setup issue!
Date: 2016-02-19 07:24:35
Message-ID: 6837D32772C03D42BF09864A2DACFF9B1D2E91D7@dcmail02.supportsoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Below is recovery.conf on slave

#---------------------------------------------------------------------------
# STANDBY SERVER PARAMETERS
#---------------------------------------------------------------------------
#
# standby_mode
#
# When standby_mode is enabled, the PostgreSQL server will work as a
# standby. It will continuously wait for the additional XLOG records, using
# restore_command and/or primary_conninfo.
#
standby_mode = 'on'
#
# primary_conninfo
#
# If set, the PostgreSQL server will try to connect to the primary using this
# connection string and receive XLOG records continuously.
#
primary_conninfo = 'host=<master server ip> port=5432'
#
#
# By default, a standby server keeps restoring XLOG records from the
# primary indefinitely. If you want to stop the standby mode, finish recovery
# and open the system in read/write mode, specify path to a trigger file.
# The server will poll the trigger file path periodically and start as a
# primary server when it's found.
#
trigger_file = '/data/main/primary.trigger'

Thanks,
Ashish

-----Original Message-----
From: Andreas Kretschmer [mailto:andreas(at)a-kretschmer(dot)de]
Sent: Thursday, February 18, 2016 5:11 PM, 17:11
To: Ashish Chauhan; pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Live steraming replication setup issue!

> Currently we have master -> slave -> DR hot standby streaming
> replication in current prod environment. Between master and slave
> server replication running fine. Between slave and DR server
> replication is broken and I am trying to fix it. For DR server, slave server is master server.
>
> Issue: Few days back, DR was lagging behind slave server and stopped
> replication. I tried to setup the replication from slave to DR
> (currently there is replication running from master to slave) with
> pg_basebackup command, I am able to restart Postgres without any error
> on DR server but when I try to run any psql on DR, it throwing up below error.
>
> psql: FATAL: the database system is starting up

please show us your recovery.conf. this should include this line:

standby_mode = 'on'

--
Andreas Kretschmer
http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Karsten Hilbert 2016-02-19 08:49:34 Re: Multiple databases and shared_buffers
Previous Message Victor Blomqvist 2016-02-19 03:45:47 Re: Query plan not updated after dropped index