From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Nagy László Zsolt <gandalf@shopzeus.com>
To: pgsql-admin@postgresql.org
Subject: Re: Will unused replication slots prevent the server from deleting WAL segments?
Date: Mon, 19 Mar 2018 09:53:00 +0100
Message-ID: <1521449580.3335.18.camel@cybertec.at> (raw)
In-Reply-To: <73cd3a8f-363f-c880-67c7-9bcf290ba2b7@shopzeus.com>
References: <73cd3a8f-363f-c880-67c7-9bcf290ba2b7@shopzeus.com>
Nagy László Zsolt wrote:
> I have accidentally created an extra replication slot on a server. It
> was a long time ago, and it is not used (active=false). I'm planning to
> add another replication slave, but I can only do it later. I wonder if
> it prevents the server to recycle old WAL segments?
>
>
> template1=# select * from pg_replication_slots;
> slot_name | plugin | slot_type | datoid | database | temporary | active
> > active_pid | xmin | catalog_xmin | restart_lsn | confirmed_flush_lsn
>
> -----------+--------+-----------+--------+----------+-----------+--------+------------+------+--------------+-------------+---------------------
> eke | | physical | | | f | f
> > | | | |
>
> docker02 | | physical | | | f | t
> > 66 | | | 0/7000000 |
>
> (2 rows)
>
>
> Should I delete this slot and add it again later, when the new slave
> becomes available?
I'm not 100% certain if it can do any harm or not, but I'd drop the
replication slot and create a new one later if you need it.
Creating a replication slot is fast and simple.
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: laurenz.albe@cybertec.at, gandalf@shopzeus.com
Subject: Re: Will unused replication slots prevent the server from deleting WAL segments?
In-Reply-To: <1521449580.3335.18.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox