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 1inJ2G-00006n-F9 for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Jan 2020 09:14:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1inJ2E-0006ON-Bk for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Jan 2020 09:14:22 +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 1inJ2D-0006J7-V7 for pgsql-hackers@lists.postgresql.org; Fri, 03 Jan 2020 09:14:22 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1inJ27-0003C5-5q for pgsql-hackers@postgresql.org; Fri, 03 Jan 2020 09:14:20 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 03CEB22129; Fri, 3 Jan 2020 04:14:14 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Fri, 03 Jan 2020 04:14:14 -0500 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=fm1; bh=iMYRkzFL86dcon5B2CgzhQXe3aSPvXwBdajZnzjnN Xo=; b=tbvKuA/YnDX2da3R76Gt/M+dIKjf8Vt8a3x4Uh3P50+vY3XHfqIyRmR+m NuMvPV9em+bSNKYr2Rf0ZRBi3INbVG/A5Lz+7Pl9n/TY5KJIYbEKaHdgs7g15iYc dIthooF96XRT4o56ZSyjKoXt5abxfWrxFoep5Nz/ZujCCw7HILz7hVAHJKO/FmD9 YVuF3BaUZCbEow723Igy06XLdSP73JfWTc6LqMjys75tquFXO6oirqVzBdqBPjZ5 3H9ZOrL3UpjYWV6E/7THQYw59COxa7XJ12sFV/OC/2AbwxYSzGX/pqepDJUy3x5c ZD7T7CeURrSNPEA6YPe66fkow0hpA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdegfedgtddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhohfkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvdhnug hquhgrughrrghnthdrtghomheqnecuffhomhgrihhnpedvnhguqhhurggurhgrnhhtrdgt ohhmnecukfhppeelfedrvdegfedrudekjedrudeggeenucfrrghrrghmpehmrghilhhfrh homhepphgvthgvrhdrvghishgvnhhtrhgruhhtsedvnhguqhhurggurhgrnhhtrdgtohhm necuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from april.pezone.net (p5df3bb90.dip0.t-ipconnect.de [93.243.187.144]) by mail.messagingengine.com (Postfix) with ESMTPA id BDBCD8005C; Fri, 3 Jan 2020 04:14:12 -0500 (EST) Subject: Re: Restore replication settings when modifying a field type To: Euler Taveira , Kyotaro Horiguchi References: <20191028.133939.559712139043653003.horikyota.ntt@gmail.com> Cc: quanzongliang@gmail.com, pgsql-hackers From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <61d38b0e-0831-d206-8390-2a08bb51905d@2ndquadrant.com> Date: Fri, 3 Jan 2020 10:14:11 +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=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 2019-11-01 04:39, Euler Taveira wrote: > ATExecAlterColumnType records everything that depends on the column > and for indexes it saves the definition (via pg_get_indexdef_string). > Definition is not sufficient for reconstructing the replica identity > information because there is not such keyword for replica identity in > CREATE INDEX. The new index should call relation_mark_replica_identity > to fix pg_index.indisreplident. Yeah, I don't think we need to do the full dance of reverse compiling the SQL command and reexecuting it, as the patch currently does. That's only necessary for rebuilding the index itself. For re-setting the replica identity, we can just use the internal API as you say. Also, a few test cases would be nice for this patch. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services