[postgres-xl-bugs] about logical replication

Mason Sharp mason.sharp at gmail.com
Thu Oct 12 04:53:59 PDT 2017


On Thu, Oct 12, 2017 at 2:35 AM irene7788 <irene7788 at 163.com> wrote:

>
>
> > 在 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?
>


> You should make your second coordinator just a regular full-fledged
cooordinator. It does not need to be a replica.  All coordinators can do
anything, you don't need a master coordinator and slaves for them. If you
lose one coordinator, you can just add a new one and it will be based on a
remaining good one.

I hope that helps.

Regards,

Mason





--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.postgres-xl.org/private.cgi/postgres-xl-bugs-postgres-xl.org/attachments/20171012/ea9744f7/attachment.html>


More information about the postgres-xl-bugs mailing list