Re: Replication identifiers, take 3 - Mailing list pgsql-hackers

From Petr Jelinek
Subject Re: Replication identifiers, take 3
Date
Msg-id 54252E9C.4060402@2ndquadrant.com
Whole thread Raw
In response to Re: Replication identifiers, take 3  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 26/09/14 04:44, Robert Haas wrote:
> On Tue, Sep 23, 2014 at 2:24 PM, Andres Freund <andres@2ndquadrant.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



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: RLS feature has been committed
Next
From: Andres Freund
Date:
Subject: Re: Replication identifiers, take 3