[postgres-xl-bugs] about logical replication

irene7788 irene7788 at 163.com
Wed Oct 11 23:35:06 PDT 2017


> 在 2017年10月12日,上午3:35,Tomas Vondra <tomas.vondra at 2ndquadrant.com> 写道:
> 
> 
> 
> On 10/11/2017 07:53 AM, Pavan Deolasee wrote:
>> 
>> 
>> On Wed, Oct 11, 2017 at 6:58 AM, irene7788 <irene7788 at 163.com
>> <mailto:irene7788 at 163.com>> wrote:
>> 
>>    I’m sorry, I didn't make the things clear.  So, I describe it again.
>> 
>>    1、my test environment
>>    one gtm
>>    one slave gtm
>>    two  data node( with two coordinator node )
>>    two  slave  datanode ( with two slave coordinator node ) — by
>>    hot-standby repicas
>> 
>> 
>>    2、my requirement
>> 
>>     I can read and write on  main node,  and the slave nodes can be
>>    read online.
>> 
> 
> I don't follow. Who will read directly from the logical replicas? The
> subset of data replicated to each datanode is somewhat unpredictable, so
> I don't see how this could work in practice. Can you elaborate?

Transaction access master node. The slave node is not a subset,  it’s a full copy.

The slave node has two uses,the one is backup,and the other is for online query.

So, we need  an efficient method to replicate. 

> 
>>    3、problems
>>    I can connect  coordinator node and data node use  psql.
>>    But  I can’t  connect  any slave coordinator node or slave data node
>>    use  psql.  The error message  is "Was unable to obtain a snapshot
>>    from GTM.”
>> 
>> 
>> Unfortunately, that functionality is currently not available. But it
>> should be coming in Postgres-XL 10 (not yet committed to the code though).
>>  
>> 
>> 
>>    Another question,Could I use logical replication in postgres-xl ?
>> 
>> 
>> You can use XL as a subscriber to a PG provider. This can help you
>> consolidate data from multiple providers into a single XL cluster for
>> data analytics. While in theory, it should be possible to use XL
>> datanode as a provider, we haven't tested that configuration and hence
>> most likely not work off the shelf. 
>> 
> 
I need a cluster database,  store data distribution in different database  in a cluster.
Not to collect multiple databases to one PG.

> Also, it will only have a subset of the data (depending on what
> distribution strategy is defined for the tables). And if there are
> replicated tables, the streams from datanodes will overlap.

In pg-xl,different nodes,I will store different data. So each the slave node is same with  main node.
Could this avoid oerlap?

> 
> You might setup logical replication for all datanodes, but I'm not sure
> how we could decode distributed transactions in a reasonable way? I'm
> not an expert in logical replication, though.

If I don't use logical replication,  how could I can make the slave node  readable?

> 
> 
> regards
> 
> -- 
> Tomas Vondra                  http://www.2ndQuadrant.com
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




More information about the postgres-xl-bugs mailing list