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 1iG3iq-0000S6-5c for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Oct 2019 16:12:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iG3io-00041N-FZ for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Oct 2019 16:12:54 +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 1iG3io-000412-2U for pgsql-hackers@lists.postgresql.org; Thu, 03 Oct 2019 16:12:54 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iG3ih-0007mU-3f for pgsql-hackers@lists.postgresql.org; Thu, 03 Oct 2019 16:12:52 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x93GCevq011115; Thu, 3 Oct 2019 12:12:40 -0400 From: Tom Lane To: Andres Freund cc: Robert Haas , PostgreSQL Hackers Subject: Re: Improving on MAX_CONVERSION_GROWTH In-reply-to: <20159.1569612302@sss.pgh.pa.us> References: <3614.1569359690@sss.pgh.pa.us> <20190927154021.jqebc2vok66hcfwu@alap3.anarazel.de> <20159.1569612302@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Fri, 27 Sep 2019 15:25:02 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11113.1570119160.1@sss.pgh.pa.us> Date: Thu, 03 Oct 2019 12:12:40 -0400 Message-ID: <11114.1570119160@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > In the meantime, I still think we should commit what I proposed in the > other thread (<974.1569356381@sss.pgh.pa.us>), or something close to it. > Andres' proposal would perhaps be an improvement on that, but I don't > think it'll be ready anytime soon; and for sure we wouldn't risk > back-patching it, while I think we could back-patch what I suggested. > In any case, that patch is small enough that dropping it would be no big > loss if a better solution comes along. Not having heard any objections, I'll proceed with that. Andres is welcome to work on replacing it with his more-complicated idea... > Also, as far as the immediate subject of this thread is concerned, > I'm inclined to get rid of MAX_CONVERSION_GROWTH in favor of using > the target encoding's max char length. I realized after re-reading the comment for MAX_CONVERSION_GROWTH that this thread is based on a false premise, namely that encoding conversions always produce one "character" out per "character" in. In the presence of combining characters and suchlike, that premise fails, and it becomes quite unclear just what the max growth ratio actually is. So I'm going to leave that alone for now. Maybe this point is an argument for pushing forward with Andres' approach, but I'm still dubious about the overall cost/benefit ratio of that concept. regards, tom lane