Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1if4cl-0005Fq-OX for pgsql-general@arkaria.postgresql.org; Wed, 11 Dec 2019 16:14:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1if4ck-0003YG-Hm for pgsql-general@arkaria.postgresql.org; Wed, 11 Dec 2019 16:14:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1if4ck-0003Y9-4A for pgsql-general@lists.postgresql.org; Wed, 11 Dec 2019 16:14:02 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1if4cd-0004oF-Q4 for pgsql-general@lists.postgresql.org; Wed, 11 Dec 2019 16:14:00 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 33C60A4E; Wed, 11 Dec 2019 11:13:54 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Wed, 11 Dec 2019 11:13:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=fm1; bh=xBGai6ONOiPBh8inwPpyhLvfuuuI/BwTVDkXIx0vG rM=; b=ixfQpSrejiohwg0938xOZWnHcTRuHZeRgcuAdiM196pYbmUrJR9k5Tiuz lG2m5xJg2V7PO+ChFrgY11LpR7AW3Fu9xd7QrIFnZquUbdNMcyDU6l+ic6FO0qdi t0fuPpGvbDklfwpfh+QLMfsIJdda48/fthh3HDmZCoCyjgmLrdf07MAnmKEAGuQt 5Ic7tfcxXO2er/ehuezIqFBRbClh6BP8mBY396I6ar2I+cGYK9LQN1i3swLJk3AF ffVqLv9QSZjKF6o5F9S0/7k9r4pSEGtAX0rW5S6XekD8wj1bSgvtn+RgiXGXfce6 NYyOfOR1NMm33YKHZcBiV2C32TWwg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudelhedgkeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhohfkffgfgggjtgfgsehtjeertddtfeehnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvdhnug hquhgrughrrghnthdrtghomheqnecuffhomhgrihhnpedvnhguqhhurggurhgrnhhtrdgt ohhmnecukfhppeelfedrvdegfedrfeegrdelleenucfrrghrrghmpehmrghilhhfrhhomh epphgvthgvrhdrvghishgvnhhtrhgruhhtsedvnhguqhhurggurhgrnhhtrdgtohhmnecu vehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from april.pezone.net (p5df32263.dip0.t-ipconnect.de [93.243.34.99]) by mail.messagingengine.com (Postfix) with ESMTPA id E9B1180060; Wed, 11 Dec 2019 11:13:52 -0500 (EST) Subject: Re: Logical Replication of Multiple Schema Versions To: Dan shmidt , "pgsql-general@lists.postgresql.org" References: From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Wed, 11 Dec 2019 17:13:51 +0100 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=windows-1252; 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 2019-12-10 08:55, Dan shmidt wrote: > What is the correct way to perform such an operation? > Is there a way to keep constraint #1 or the only option is to not allow > "breaking" schema changes between versions. It all depends on the specific schema changes you want to make. You can add columns on the subscriber and remove columns on the publisher without breaking things (unless there are not-null constraints). Renaming columns will break replication until you rename them everywhere. Column type changes will usually just work as long as the data fits into both the old and the new type. You really need to carefully plan and test each class of scenarios separately. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services