Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1exqXU-000365-PJ for pgsql-admin@arkaria.postgresql.org; Mon, 19 Mar 2018 08:53:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1exqXT-00041S-Q9 for pgsql-admin@arkaria.postgresql.org; Mon, 19 Mar 2018 08:53:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1exqXT-00041I-Ht for pgsql-admin@lists.postgresql.org; Mon, 19 Mar 2018 08:53:07 +0000 Received: from mx1.mailbox.org ([80.241.60.212]) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1exqXQ-0000FK-FQ for pgsql-admin@postgresql.org; Mon, 19 Mar 2018 08:53:07 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 82A7B40F6F; Mon, 19 Mar 2018 09:53:02 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id RqYCgNMqIWOq; Mon, 19 Mar 2018 09:53:01 +0100 (CET) Message-ID: <1521449580.3335.18.camel@cybertec.at> Subject: Re: Will unused replication slots prevent the server from deleting WAL segments? From: Laurenz Albe To: Nagy =?ISO-8859-1?Q?L=E1szl=F3?= Zsolt , pgsql-admin@postgresql.org Date: Mon, 19 Mar 2018 09:53:00 +0100 In-Reply-To: <73cd3a8f-363f-c880-67c7-9bcf290ba2b7@shopzeus.com> References: <73cd3a8f-363f-c880-67c7-9bcf290ba2b7@shopzeus.com> Organization: Cybertec Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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