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 1iwPdK-0000ag-2N for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Jan 2020 12:06:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iwPdI-0000Ng-SN for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Jan 2020 12:06:16 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1iwPdI-0000NZ-2f for pgsql-hackers@lists.postgresql.org; Tue, 28 Jan 2020 12:06:16 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iwPdE-0000m9-DZ for pgsql-hackers@postgresql.org; Tue, 28 Jan 2020 12:06:15 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id EE5EA22017; Tue, 28 Jan 2020 07:06:09 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Tue, 28 Jan 2020 07:06:09 -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=FIpsX25aaQw/Ok/8pU1O7XmfvdQsZYqb4AXhu15Ta /A=; b=brxuDCLmWqWo1p/p1pYSQueMJUS+74NOVBbaff9MklUHA1MRB9KXLWesU dmmWQm5lvGfjKLyV7ipDjcTM9gnbu4e0WfKWZBfName0W8VIIERPhjSG4VQQPSil ssjfa5ZJ5T0XG4D9vQRNdti7/bmOj1RGNT+atJaNxnit4UD7sksH4Id22kXavnau IAO5Niv4ffG02H1mNFyLDqOy5YIkfkr8S9jMxFQx1IkZcLGgz/y6zr7JPNpN1Ugu X1T+Bk6tH2oJccUx7RnBfGreW0gBUlkeCuOlyI3tOB2viEqlXjYTG8BEKK1AmfIH JtCV8hheeJc0jGOul2G08xAuPPIxQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrfeeggdefhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhfhokffffgggjggtgfesthejredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsedvnhguqh hurggurhgrnhhtrdgtohhmqeenucffohhmrghinhepvdhnughquhgrughrrghnthdrtgho mhenucfkphepleefrddvgedvrddvheehrdduuddvnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhhtsedv nhguqhhurggurhgrnhhtrdgtohhm X-ME-Proxy: Received: from april.pezone.net (p5df2ff70.dip0.t-ipconnect.de [93.242.255.112]) by mail.messagingengine.com (Postfix) with ESMTPA id 2DB86328005D; Tue, 28 Jan 2020 07:06:08 -0500 (EST) Subject: Re: Collation versioning To: Julien Rouhaud , Thomas Munro References: <20191108013654.GA1768@paquier.xyz> <3c3b9ff84d21acf3188558928249d04db84ea2e9.camel@cybertec.at> <20191128045041.GW237562@paquier.xyz> Cc: Robert Haas , Michael Paquier , Laurenz Albe , Douglas Doole , Christoph Berg , Pg Hackers From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <3ede40e7-5799-7096-dc5f-d7beda8e7145@2ndquadrant.com> Date: Tue, 28 Jan 2020 13:06:06 +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-12-17 14:25, Julien Rouhaud wrote: > PFA rebased v6, with the following changes: Some thoughts on this patch set. I think we are all agreed on the general idea. 0001-0003 seem pretty much OK. Why is pg_depend.refobjversion of type "name" whereas the previous pg_collation.collversion was type "text"? Related to that, we previously used null to indicate an unknown collation version, and now it's an empty string. Also, this would limit collation versions to 63 characters. Perhaps not a problem right now, but if someone wants to implement Thomas's previous md5-the-file idea with sha256, we'll run out of space. For 0005, if the new commands are only to be used in binary upgrades, then they should be implemented as built-in functions instead of full DDL commands. There is precedent for that. The documentation snippet for this patch talks about upgrades from PG12 to later. But what about upgrades on platforms where we currently don't have collation versioning but might introduce it later (FreeBSD, Windows)? This needs to be generalized. For 0006 ("Add a new ALTER INDEX name DEPENDS ON COLLATION name CURRENT VERSION"), I find the syntax misleading. This command doesn't (or shouldn't) add a new dependency, it only changes the version of an existing dependency. The previously used syntax ALTER COLLATION / REFRESH VERSION is a better vocabulary, I think. I think this whole thing needs more tests. We are designing this delicate mechanism but have no real tests for it. We at least need to come up with a framework for how to test this automatically, so that we can add more test cases over time as people will invariably report issues when this hits the real world. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services