On 3 January 2017 at 21:32, valeriof <valerio_farruggio@hotmail.com> wrote:
> Craig Ringer-3 wrote
>> Take a look at how pglogical does it in its replication set handling
>> and relation metadata cache.
>
> I checked it out but for what I understand it uses the inline parameter.
It specifies which replication sets to use with logical decoding parameters.
Those are in turn looked up in user-catalog tables to find mappings of
relations to replication sets.
A cache is used to avoid reading those tables for every tuple.
> Would it be possible to store this info in some config table and then run a
> select from inside the plugin?
Yes, that's what pglogical does.
-- Craig Ringer http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services