Re: Replication identifiers, take 3

From: Petr Jelinek <petr(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Steve Singer <steve(at)ssinger(dot)info>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Replication identifiers, take 3
Date: 2014-09-26 09:15:08
Message-ID: 54252E9C.4060402@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 26/09/14 04:44, Robert Haas wrote:
> On Tue, Sep 23, 2014 at 2:24 PM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
>>
>> Note that it depends on the replication solution whether these
>> external identifiers need to be coordinated across systems or not. I
>> think it's *good* if we don't propose a solution for that - different
>> replication solutions will have different requirements.
>
> I'm pretty fuzzy on how this actually works. Like, the short form
> here is just getting injected into WAL by the apply process. How does
> it figure out what value to inject? What if it injects a value that
> doesn't have a short-to-long mapping? What's the point of the
> short-to-long mappings in the first place? Is that only required
> because of the possibility that there might be multiple replication
> solutions in play on the same node?
>

From my perspective the short-to-long mapping is mainly convenience
thing, long id should be something that can be used to map the
identifier to the specific node for the purposes of configuration,
monitoring, troubleshooting, etc. You also usually don't use just Oids
to represent the DB objects, I see some analogy there.
This could be potentially done by the solution itself, not by the
framework, but it seems logical (pardon the pun) that most (if not all)
solutions will want some kind of mapping of the generated ids to
something that represents the logical node.

So answer to your first two questions depends on the specific solution,
it can map it from connection configuration, it can get the it from the
output plugin as part of wire protocol, it can generate it based on some
internal logic, etc.

--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2014-09-26 11:40:12 Re: Scaling shared buffer eviction
Previous Message Simon Riggs 2014-09-26 09:12:30 Re: RLS feature has been committed