Re: Replication identifiers, take 4

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Steve Singer <steve(at)ssinger(dot)info>, Petr Jelinek <petr(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Subject: Re: Replication identifiers, take 4
Date: 2015-02-16 00:24:21
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 2015-02-16 01:21:55 +0100, Andres Freund wrote:
> Here's my next attept attempt at producing something we can agree
> upon.
> The major change that might achieve that is that I've now provided a
> separate method to store the origin_id of a node. I've made it
> conditional on !REPLICATION_IDENTIFIER_REUSE_PADDING, to show both
> paths. That new method uses Heikki's xlog rework to dynamically add the
> origin to the record if a origin is set up. That works surprisingly
> simply.
> Other changes:
> * Locking preventing several backends to replay changes at the same
> time. This is actually overly restrictive in some cases, but I think
> good enough for now.
> * Logical decoding grew a filter_by_origin callback that allows to
> ignore changes that were replayed on a remote system. Such filters are
> executed before much is done with records, potentially saving a fair
> bit of costs.
> * Rebased. That took a bit due the xlog and other changes.
> * A couple more SQL interface functions (like dropping a replication
> identifier).

And here an actual patch.


Andres Freund

Andres Freund
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
0001-Introduce-replication-identifiers-to-keep-track-of-r.patch text/x-patch 91.4 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2015-02-16 00:44:51 Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} 2.0
Previous Message Andres Freund 2015-02-16 00:21:55 Re: Replication identifiers, take 4