Replicate via pglogical on a hot

I am running two databases (PostgreSQL 9.5.7) in a master/slave setup. My application is connecting to a pgpool instance which routes to the master database (and slave for read only queries).

Now I am trying to scale out some data to another read-only database instance containing only a few tables. This works perfectly using pglogical directly on the master database.

However if the master transitions to slave for some reason, pglogical can't replicate any longer because the node is in standby.

Tried following things:

  • subscribed on the slave since it's less likely to go down, or overheated: Can't replicate on standby node.
  • subscribed via pgpool server: pgpool doesn't accept replication connections.
  • subscribed to both servers: pglogical config gets replicated along, so can't give them different node names.
  • The only thing I can think of now is to write my own tcp proxy which regularly checks for the state of the server to which I can subscribe to.

    Is there any other/easier way I can solve this ? Am I using the wrong tools perhaps ?


    Ok so it seems that there are no solutions for this problem just yet. Since the data in my logically replicated database is not changing fast, there is no harm if the replication stops for a moment.

    Actions on failover could be:

  • Re-subscribe to the promoted master.
  • or promote standby node back to master after failover.
  • 链接地址: http://www.djcxy.com/p/83274.html

    上一篇: iOS Keychain偶尔会返回空字符串

    下一篇: 在热点上通过pglogical进行复制