Re: Physical replication slots and xlog space exhaust

Поиск
Список
Период
Сортировка
От Alex Balashov
Тема Re: Physical replication slots and xlog space exhaust
Дата
Msg-id 20190429104420.GA28142@typhoon
обсуждение исходный текст
Ответ на Physical replication slots and xlog space exhaust  (Alex Balashov <abalashov@evaristesys.com>)
Список pgsql-admin
On Mon, Apr 29, 2019 at 12:30:01PM +0200, Juan José Santamaría Flecha wrote:

> > We I understand the ultimate solution to this is to mind one’s replication
> > slots and monitor disk usage fastidiously, but is there a config parameter
> > for the maximum overall amount of transaction logs that can be kept
> > accumulated on the master, irrespectively of physical replication slots
> > commitments?
> >
> 
> Doing that would break the desired functionality of replication slots.
> There is a caution note about this behaviour in the documentation [1].
> 
> Using the pg_replication_slots view you can check which slot is active or
> if there is a good candidate for dropping.
> 
> Or you can take a more traditional approach using the wal_keep_segments
> parameter instead of slots.

Hi,

While these are physical rather than logical replication slots, you seem
to be correct:

https://www.postgresql.org/docs/current/warm-standby.html#STREAMING-REPLICATION-SLOTS

   "In lieu of using replication slots, it is possible to prevent the
    removal of old WAL segments using wal_keep_segments, or by storing the
    segments in an archive using archive_command. However, these methods
    often result in retaining more WAL segments than required, whereas
    replication slots retain only the number of segments known to be needed.
    An advantage of these methods is that they bound the space requirement
    for pg_wal; there is currently no way to do this using replication
    slots."

I suppose, as usual, I would have been wise to simply RTFM. :-) 

Thank you for your feedback!

-- Alex

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/



В списке pgsql-admin по дате отправления:

Предыдущее
От: "Anjul Tyagi"
Дата:
Сообщение: Postgres Service in SUSE
Следующее
От: John Lumby
Дата:
Сообщение: admin control over cancelling autovacuum when blocked by a lock