Re: Applying logical replication changes by more than one process - Mailing list pgsql-hackers

From Petr Jelinek
Subject Re: Applying logical replication changes by more than one process
Date
Msg-id 56EFF76B.6060700@2ndquadrant.com
Whole thread Raw
In response to Re: Applying logical replication changes by more than one process  (Andres Freund <andres@anarazel.de>)
Responses Re: Applying logical replication changes by more than one process
List pgsql-hackers
On 21/03/16 14:25, Andres Freund wrote:
> On 2016-03-21 14:18:27 +0100, Petr Jelinek wrote:
>> On 21/03/16 14:15, Andres Freund wrote:
>>>> Only when the origin is actually setup for the current session. You
>>>> need
>>>> to call the replorigin_advance yourself from your apply code.
>>>
>>> That's problematic from a durability POV.
>>>
>>
>> Huh? How come?
>
> If you use the session mechanism the replication progress is synced with
> the apply process, even if there are crashes. Crash recovery updates the
> progress.  There's no such interlock with apply otherwise, and I don't
> see how you can build one with reasonable effort.
>

Ah you mean because with wal_log=true the origin advance is in different 
WAL record than commit? OK yeah you might be one transaction behind 
then, true.

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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Applying logical replication changes by more than one process
Next
From: Robert Haas
Date:
Subject: Re: Parallel Aggregate