Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-22 Thread konstantin knizhnik
On Mar 22, 2016, at 11:14 AM, Petr Jelinek wrote: > > And each slot means connection with logical decoding attached to it so you > don't really want to have thousands of those anyway. I think you'll hit other > problems faster than loop over slots becomes problem if you plan to keep all > of

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-22 Thread konstantin knizhnik
On Mar 22, 2016, at 10:10 AM, Craig Ringer wrote: > On 22 March 2016 at 14:32, konstantin knizhnik > wrote: > >> 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,

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-22 Thread Petr Jelinek
On 22/03/16 07:32, konstantin knizhnik wrote: On Mar 21, 2016, at 4:30 PM, Petr Jelinek wrote: 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.

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-22 Thread Craig Ringer
On 22 March 2016 at 14:32, konstantin knizhnik wrote: > 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. > > > It actually means that we can not enforce

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-22 Thread konstantin knizhnik
On Mar 21, 2016, at 4:30 PM, Petr Jelinek wrote: > 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

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Petr Jelinek
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

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Andres Freund
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. > > > >

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Petr Jelinek
On 21/03/16 14:15, Andres Freund wrote: On March 21, 2016 2:08:54 PM GMT+01:00, Petr Jelinek wrote: On 21/03/16 13:44, Konstantin Knizhnik wrote: On 21.03.2016 15:10, Petr Jelinek wrote: Hi, On 19/03/16 11:46, Konstantin Knizhnik wrote: Hi, I am trying to use

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Andres Freund
On March 21, 2016 2:08:54 PM GMT+01:00, Petr Jelinek wrote: >On 21/03/16 13:44, Konstantin Knizhnik wrote: >> >> >> On 21.03.2016 15:10, Petr Jelinek wrote: >>> Hi, >>> >>> On 19/03/16 11:46, Konstantin Knizhnik wrote: Hi, I am trying to use logical

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Petr Jelinek
On 21/03/16 13:44, Konstantin Knizhnik wrote: On 21.03.2016 15:10, Petr Jelinek wrote: Hi, On 19/03/16 11:46, Konstantin Knizhnik wrote: Hi, I am trying to use logical replication mechanism in implementation of PostgreSQL multimaster and faced with one conceptual problem. Originally

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Konstantin Knizhnik
On 21.03.2016 15:10, Petr Jelinek wrote: Hi, On 19/03/16 11:46, Konstantin Knizhnik wrote: Hi, I am trying to use logical replication mechanism in implementation of PostgreSQL multimaster and faced with one conceptual problem. Originally logical replication was intended to support

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Petr Jelinek
Hi, On 19/03/16 11:46, Konstantin Knizhnik wrote: Hi, I am trying to use logical replication mechanism in implementation of PostgreSQL multimaster and faced with one conceptual problem. Originally logical replication was intended to support asynchronous replication. In this case applying

Re: [HACKERS] Applying logical replication changes by more than one process

2016-03-21 Thread Petr Jelinek
Hi, On 19/03/16 11:46, Konstantin Knizhnik wrote: Hi, I am trying to use logical replication mechanism in implementation of PostgreSQL multimaster and faced with one conceptual problem. Originally logical replication was intended to support asynchronous replication. In this case applying

[HACKERS] Applying logical replication changes by more than one process

2016-03-19 Thread Konstantin Knizhnik
Hi, I am trying to use logical replication mechanism in implementation of PostgreSQL multimaster and faced with one conceptual problem. Originally logical replication was intended to support asynchronous replication. In this case applying changes by single process should not be a bottleneck.