Re: Optimization of vacuum for logical replication

2019-08-23 Thread Konstantin Knizhnik
On 22.08.2019 6:13, Kyotaro Horiguchi wrote: Hello. At Wed, 21 Aug 2019 18:06:52 +0300, Konstantin Knizhnik wrote in <968fc591-51d3-fd74-8a55-40aa770ba...@postgrespro.ru> Ok, you convinced me that there are cases when people want to combine logical replication with streaming replication

Re: Optimization of vacuum for logical replication

2019-08-22 Thread Konstantin Knizhnik
On 22.08.2019 6:13, Kyotaro Horiguchi wrote: Hello. At Wed, 21 Aug 2019 18:06:52 +0300, Konstantin Knizhnik wrote in <968fc591-51d3-fd74-8a55-40aa770ba...@postgrespro.ru> Ok, you convinced me that there are cases when people want to combine logical replication with streaming replication

Re: Optimization of vacuum for logical replication

2019-08-22 Thread Kyotaro Horiguchi
Hello. At Wed, 21 Aug 2019 18:06:52 +0300, Konstantin Knizhnik wrote in <968fc591-51d3-fd74-8a55-40aa770ba...@postgrespro.ru> > Ok, you convinced me that there are cases when people want to combine > logical replication with streaming replication without slot. > But is it acceptable to have

Re: Optimization of vacuum for logical replication

2019-08-21 Thread Konstantin Knizhnik
On 21.08.2019 14:45, Bernd Helmle wrote: Am Mittwoch, den 21.08.2019, 13:26 +0300 schrieb Konstantin Knizhnik: Yes, it is possible to have physical replica withotu replication slot. But it is not safe, because there is always a risk that lag between master and replica becomes larger than

Re: Optimization of vacuum for logical replication

2019-08-21 Thread Bernd Helmle
Am Mittwoch, den 21.08.2019, 13:26 +0300 schrieb Konstantin Knizhnik: > Yes, it is possible to have physical replica withotu replication > slot. > But it is not safe, because there is always a risk that lag between > master and replica becomes larger than size of WAL kept at master. Sure, but

Re: Optimization of vacuum for logical replication

2019-08-21 Thread Sergei Kornilov
Hello > Also I can't believe that  DBA which explicitly sets wal_level is set to > logical will use streaming replication without associated replication slot. I am. > Yes, it is possible to have physical replica withotu replication slot. > But it is not safe, because there is always a risk that

Re: Optimization of vacuum for logical replication

2019-08-21 Thread Konstantin Knizhnik
On 21.08.2019 12:34, Bernd Helmle wrote: Am Mittwoch, den 21.08.2019, 12:20 +0300 schrieb Konstantin Knizhnik: I wonder if we can check that 1. wal_revel is "logical" 2. There are no physical replication slots 3. WAL archiving is disables Not sure i get that correctly, i can still have a

Re: Optimization of vacuum for logical replication

2019-08-21 Thread Bernd Helmle
Am Mittwoch, den 21.08.2019, 12:20 +0300 schrieb Konstantin Knizhnik: > I wonder if we can check that > > 1. wal_revel is "logical" > 2. There are no physical replication slots > 3. WAL archiving is disables Not sure i get that correctly, i can still have a physical standby without replication

Optimization of vacuum for logical replication

2019-08-21 Thread Konstantin Knizhnik
Hi, hackers. Right now if replication level is rgeater or equal than "replica", vacuum  of relation copies all its data to WAL:     /*      * We need to log the copied data in WAL iff WAL archiving/streaming is      * enabled AND it's a WAL-logged rel.      */     use_wal = XLogIsNeeded() &&