From: | Alex Balashov <abalashov(at)evaristesys(dot)com> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Physical replication slots and xlog space exhaust |
Date: | 2019-04-29 10:44:20 |
Message-ID: | 20190429104420.GA28142@typhoon |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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/
From | Date | Subject | |
---|---|---|---|
Next Message | John Lumby | 2019-04-29 21:02:40 | admin control over cancelling autovacuum when blocked by a lock |
Previous Message | Anjul Tyagi | 2019-04-29 06:57:57 | Postgres Service in SUSE |