Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gBoLV-0001Bk-CK for pgsql-general@arkaria.postgresql.org; Sun, 14 Oct 2018 21:54:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gBoLT-0001MF-16 for pgsql-general@arkaria.postgresql.org; Sun, 14 Oct 2018 21:54:43 +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 1gBoLS-0001M8-Pg for pgsql-general@lists.postgresql.org; Sun, 14 Oct 2018 21:54:42 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gBoLQ-0005zB-CH for pgsql-general@lists.postgresql.org; Sun, 14 Oct 2018 21:54:42 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 3DE7821DC7; Sun, 14 Oct 2018 17:54:39 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sun, 14 Oct 2018 17:54:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=77E5wYuB3ipmHMV7VKdjKYPv4Of IQ8PqcEuwa0CIdjA=; b=GcaGN7V9u5JLhmeECvpo6cs17mbn+3o60UIceHGaX7i 35MWqBSYQXqIliPGSBZ7HiSxuu73xdOjsNQ2IHtnQKXT1F006F79Xf5AkD1jnQzu S6KZH7I9GLBBiYsNDXzzEk/QqTshFFykk6RegLzQ6SVt2K0u2biXJmDV8w32Pdzl mlKBXJn6pT8Mpv4lcPhpumfTFWSvk3eJAK+JTlGGt8phtk6F9g1vwRjRIsg2w7ih CYn1zukHV96kqp7Y7Cu9MhJaBvWiMl5yQq14cVO36KoVG8NUY7jZYnlacFjzc5Di a5KntGA+zIlcf7G/vyTUZbrE7qW/kPRyp1fLa6xiHPg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=77E5wY uB3ipmHMV7VKdjKYPv4OfIQ8PqcEuwa0CIdjA=; b=aT0rNJvXkf1rMD6PfGUpTQ Lk6jZNYDEDy0o3R4FPa5/bS3bvshFB+RQBS2iGo8P6JMY6I1gtH2YDln5XzbkrdJ g4K/M9mIpWxvcKxDWr+ULPds/Zdr8OTokVGvOQMYhQQmFj1OV4E3yM40LlzAy7Ad dL+3W/CdRncYw4brkvDti9Md8n0dPxNLIbKj3HfW01aTJ5ZUM+wYUjfM2p0HJ/Dl R+h3EIXG3U+SNPrRfZJasm6b+PIvPuDW6a1yJcejG7Mwmk8Zmy6m/5vSnMlvIMOf ijtFuMZ0VmXGrXOLThyzCxIAbyXPwyAW0n2krvvMmqLK+VRz7yoByirHt5p9BHzg == X-ME-Sender: X-ME-Proxy: Received: from intern.anarazel.de (c-71-202-120-112.hsd1.ca.comcast.net [71.202.120.112]) by mail.messagingengine.com (Postfix) with ESMTPA id ACDB6102D5; Sun, 14 Oct 2018 17:54:38 -0400 (EDT) Date: Sun, 14 Oct 2018 14:54:36 -0700 From: Andres Freund To: bhargav kamineni Cc: pgsql-general@lists.postgresql.org Subject: Re: Slot issues Message-ID: <20181014215436.ftdsmzyae4nxhadv@alap3.anarazel.de> References: <20181014202042.gi6o3kitjvczc5ym@alap3.anarazel.de> <20181014211054.wxsekk3lqmdlacos@alap3.anarazel.de> <20181014212432.tddouorjgpcpi6af@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2018-10-15 03:18:35 +0530, bhargav kamineni wrote: > > You probably afterwards want to drop those slots from the new standby. > > See the following section from the docs: > > > > https://www.postgresql.org/docs/current/static/continuous-archiving.html#BACKUP-LOWLEVEL-BASE-BACKUP-DATA > "It is often a good idea to also omit from the backup the files within the > cluster's pg_replslot/ directory, so that replication slots that exist on > the master do not become part of the backup. Otherwise, the subsequent use > of the backup to create a standby may result in indefinite retention of WAL > files on the standby, and possibly bloat on the master if hot standby > feedback is enabled, because the clients that are using those replication > slots will still be connecting to and updating the slots on the master, not > the standby. Even if the backup is only intended for use in creating a new > master, copying the replication slots isn't expected to be particularly > useful, since the contents of those slots will likely be badly out of date > by the time the new master comes on line." > > Since i already synced the pg_repslot to standby ,Is it okay if i remove > the pg_repslot directory befor starting postgresql service ? You can do that, but the nicer way probably is to just remove them via sql once started. Something like SELECT pg_drop_replication_slot(slot_name) FROM pg_replication_slots; Greetings, Andres Freund