Re: Optimization of vacuum for logical replication - Mailing list pgsql-hackers

From Sergei Kornilov
Subject Re: Optimization of vacuum for logical replication
Date
Msg-id 1347121566385671@iva1-9be92bdead40.qloud-c.yandex.net
Whole thread Raw
In response to Re: Optimization of vacuum for logical replication  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
List pgsql-hackers
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 lag between
> master and replica becomes larger than size of WAL kept at master.

Just an example: replica for manual queries, QA purposes or for something else that is not an important part of the
system.
If I use replication slots - my risk is out-of-space on primary and therefore shutdown of primary. With downtime for
application.
If I use wal_keep_segments instead - I have some limited (and usually stable) amount of WAL but risk to have outdated
replica.

I prefer to have an outdated replica but primary is more safe. Its OK for me to just take fresh pg_basebackup from
anotherreplica.
 
And application want to use logical replication so wal_level = logical.

If we not want support such usecase - we need explicitly forbid replication without replication slots.

regards, Sergei



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: POC: Cleaning up orphaned files using undo logs
Next
From: Bernd Helmle
Date:
Subject: Re: Optimization of vacuum for logical replication