Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jpxIY-0001F7-NT for pgsql-admin@arkaria.postgresql.org; Mon, 29 Jun 2020 17:10:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jpxIW-00021n-Mc for pgsql-admin@arkaria.postgresql.org; Mon, 29 Jun 2020 17:10:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jpxIW-00021g-Em for pgsql-admin@lists.postgresql.org; Mon, 29 Jun 2020 17:10:24 +0000 Received: from forward2-smtp.messagingengine.com ([66.111.4.226]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jpxIP-0006nU-7h for pgsql-admin@postgresql.org; Mon, 29 Jun 2020 17:10:23 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailforward.nyi.internal (Postfix) with ESMTP id F35381940C34; Mon, 29 Jun 2020 13:10:14 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 29 Jun 2020 13:10:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding: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=fm3; bh=IaVsRpxY12fumjTjx9I3tE1yf3RDGdfnhkwOlh9Ic UA=; b=F4hTPYHL8AckWQO9kGX61u3cnEZg0fC5UBlEmC+hAd+Jl3wBwACUDX1Wt MBMfvUn7wiokZwnMCv7022h7fWza/jgR32LzEa0IyFdO/sz5Uk9fJqeeoZEAdQnL dKhIcogyUkkAzjmy+WCYPa724PwuB2pOdOXdAdEbjbkfUQsLfApaFGlxdRgVDLvO LqrydOcZgEeY3eMGShTF0VUS5y2ILB0mK1Iv9bfO2UNkmQnPZ2qYCGG6fe3HwDm3 4J6RUs3djqUQOChskzyiYRqW24UvPDbn/KD/FWgNICfNC7oxnCHt/B9bBl7lqG/U usCdcVgHjdtclUM4PiWhyfnVFL86Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudelledgfeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhohfkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvdhnug hquhgrughrrghnthdrtghomheqnecuggftrfgrthhtvghrnheptdevgeehtdejvdevvdel jeeuveejjedtleelgfekleefieekjeelgfektdduuedvnecuffhomhgrihhnpedvnhguqh hurggurhgrnhhtrdgtohhmnecukfhppeelfedrvdegfedrudeluddrvdefkeenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvih hsvghnthhrrghuthesvdhnughquhgrughrrghnthdrtghomh X-ME-Proxy: Received: from april.pezone.net (p5df3bfee.dip0.t-ipconnect.de [93.243.191.238]) by mail.messagingengine.com (Postfix) with ESMTPA id 984EA3280059; Mon, 29 Jun 2020 13:10:13 -0400 (EDT) Subject: Re: After renaming a database the subscription ( logical replication) stay sticky to the old database (master) To: Mai Peng , pgsql-admin@postgresql.org References: Cc: =?UTF-8?Q?Yannick_Le_Gu=c3=a9dart?= From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Mon, 29 Jun 2020 19:10:12 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-06-29 14:58, Mai Peng wrote: > I restored the production database to staging environment, then dropped the publication on old database, dropped the subscription on the slave. > I have to rename the old database in order to keep an old version of data. When I re-add the subscription logical replication, pointing to the new database, the slave still want to synchronize to the old database ( renamed) and the accumulated WAL files are crashing the filesystem. > How can I handle the problem ? You need to be more specific what exactly you are doing, including specific commands. For example, "pointing to" is not a specific enough technical term. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services