Re: How to find local logical replication origin?

From: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>
To: Jinhua Luo <luajit(dot)io(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: How to find local logical replication origin?
Date: 2018-09-10 12:07:26
Message-ID: e06acdd8-0c34-16c8-41ff-ec9b4a49115d@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 10/09/18 05:30, Jinhua Luo wrote:
> Because I found in the source codes that if not explicitly set (e.g.
> via pg_replication_origin_session_setup), the
> replorigin_session_origin included in the wal is InvalidRepOriginId,
> correct?

This is correct, unless explicitly set, it will be InvalidRepOriginId.

> Jinhua Luo <luajit(dot)io(at)gmail(dot)com> 于2018年9月9日周日 下午10:16写道:
>>
>> Could I assume all local originated changes is with InvalidRepOriginId?
>> Jinhua Luo <luajit(dot)io(at)gmail(dot)com> 于2018年9月8日周六 下午5:41写道:
>>>
>>> Hi All,
>>>
>>> What's the local logical replication origin, which could be used to
>>> filter local changes in the replication slot?
>>>
>>> In other words, I'm curious that what's the default replication
>>> origin? Because normal DML locally does not set any origin explicitly,
>>> correct?
>

--
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 Alvaro Herrera 2018-09-10 12:47:47 Re: cache lookup failed for constraint when alter table referred by partition table
Previous Message Michael Paquier 2018-09-10 11:36:03 Re: Can I just reload the slave to change primary_conninfo?