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 1iSKP8-0005vs-Cl for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Nov 2019 12:27:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iSKP7-0004OS-4b for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Nov 2019 12:27:17 +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 1iSKP6-0004OL-0r for pgsql-hackers@lists.postgresql.org; Wed, 06 Nov 2019 12:27:16 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iSKP2-0004Q8-K9 for pgsql-hackers@postgresql.org; Wed, 06 Nov 2019 12:27:15 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id C91FA546; Wed, 6 Nov 2019 07:27:08 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 06 Nov 2019 07:27: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=pB1Mh1vKvBrNTKqsLf7lJBnjyoYMbL9mb9PHWkxxB HA=; b=NXVFDWU4zZuWMr9MJGW46VjtIMi1+O80WZkpumkdFzQvmcN/3xrq2Tovu tdQyRDmi3mZ+MM9FkHSE7w2rfcgwKco+JyA1/K89yifGKpmuzUz9+MJol2f6fcyx V5fQrJUOZgDlBHRA9C1Zmz2RteG0vGjV75nvWpNlVGif6cknX5mjBPdepX23y/c8 +kd6pVte0hpYAQxJbDaakSGhHMoLomVcinwY3cdAptbqcAEohpGb1v3Ofo3iJfW9 1LaZMgvea/rRvo5lMm7Pm9VO+DWDgEwYPD5ZnQf33XjID7ihKOUVHiHPcEnPsfB5 AyXRd/OvKk3c7CCXVWWPjHbFRzF0g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedruddujedggedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhohfkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvdhnug hquhgrughrrghnthdrtghomheqnecuffhomhgrihhnpedvnhguqhhurggurhgrnhhtrdgt ohhmpdhpohhsthhgrhgvshhqlhdrohhrghenucfkphepleefrddvgedvrddugeejrdejle enucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhhtsedv nhguqhhurggurhgrnhhtrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from april.pezone.net (p5df2934f.dip0.t-ipconnect.de [93.242.147.79]) by mail.messagingengine.com (Postfix) with ESMTPA id 03A1A3060057; Wed, 6 Nov 2019 07:27:06 -0500 (EST) Subject: Re: Collation versioning To: Thomas Munro , Julien Rouhaud References: <20180905191014.GA29241@msg.df7cb.de> <20180912081547.GA24584@msg.df7cb.de> <0447ec7b-cdb6-7252-7943-88a4664e7bb7@2ndquadrant.com> <20180912112548.GC24584@msg.df7cb.de> <4f60612c-a7b5-092d-1532-21ff7a106bd5@2ndquadrant.com> Cc: Douglas Doole , Thomas Munro , Christoph Berg , Pg Hackers From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Wed, 6 Nov 2019 13:27:05 +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-04 04:58, Thomas Munro wrote: > * We'd need to track dependencies on the default collation once we > have versioning for that (see > https://www.postgresql.org/message-id/flat/5e756dd6-0e91-d778-96fd-b1bcb06c161a%402ndquadrant.com). > That is how most people actually consume collations out there in real > life, and yet we don't normally track dependencies on the default > collation and I don't know if that's simply a matter of ripping out > all the code that looks like "xxx != DEFAULT_COLLATION_ID" in the > dependency analysis code or if there's more to it. As I was working on that lately, I came to the conclusion that we should get *this* patch done first. My patch for default collation versioning had the version of the default collation in the pg_collation record for the "default" collation. But that way you can't set the collation version during CREATE DATABASE. It's also pretty complicated (but not impossible) to get the collation version in template1 set during initdb. So you'd need a new mechanism, perhaps to store it in pg_database instead. So instead of going through all those complications of creating this new mechanism, only to rip it out again not much later, we should focus on moving the per-object tracking forward. That would solve these problems because you don't need to track the version at database creation time, only when you create objects using the collations. > * Some have expressed doubt that pg_depend is the right place for > this; let's see if any counter-proposals appear. The only alternative is to create a new catalog that contains exactly the same columns as pg_depend (minus deptype) plus the version. That would work but it would just create a lot of code duplication, I think. One thing I've been thinking about is whether this object-version concept could extend to other object types. For example, if someone changes the binary layout of a type, they could change the version of the type, and this catalog could track the type version in the column -> type dependency. Obviously, a lot more work would have to be done to make this work, but I think the concept of this catalog is sound. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services