Re: streaming replication not working

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: streaming replication not working
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B17C23AAF@ntex2010a.host.magwien.gv.at
обсуждение исходный текст
Ответ на streaming replication not working  (John DeSoi <desoi@pgedit.com>)
Ответы Re: streaming replication not working  (John DeSoi <desoi@pgedit.com>)
Список pgsql-general
John DeSoi wrote:
> I have a 9.2.4 (CentOS 6.5) standby that has been working with no problems using log shipping. I
> wanted to add streaming replication which I thought would be as simple as adding primary_conninfo to
> recovery.conf and restarting the standby. But on restart there is no message or error about connecting
> to the primary for replication. pg_stat_replication is empty on the primary and I don't see any errors
> on the primary either.
> 
> Here is what I have on the standby:
> 
> postgresql.conf
> 
> hot_standby = on
> max_wal_senders = 2
> wal_level = hot_standby

You should set the same parameters on the primary, else it won't work.

> recovery.conf
> 
> standby_mode = 'on'
> trigger_file = '/pgsql/9.2/data/failover.trigger'
> primary_conninfo = 'host=localhost port=21333 user=postgres'
> restore_command = 'pg_standby -t /pgsql/9.2/data/failover.trigger /shared/pgbackup %f %p %r'
> archive_cleanup_command = 'pg_archivecleanup /shared/pgbackup %r'
> 
> 
> I have a ssh tunnel setup on localhost and have verified the replication user can connect to the
> primary.
> 
> Am I missing something obvious? Do I have to back up the primary again to make this change?

No, that shouldn't be necessary.

What are the messages in the secondary's log
after you start it?

Yours,
Laurenz Albe

В списке pgsql-general по дате отправления:

Предыдущее
От: sachin kotwal
Дата:
Сообщение: Re: Problems with vacuum
Следующее
От: John DeSoi
Дата:
Сообщение: Re: streaming replication not working