Re: Improving on MAX_CONVERSION_GROWTH
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Robert Haas <robertmhaas@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-10-03T16:12:40Z
Lists: pgsql-hackers
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
Commits
-
Avoid unnecessary out-of-memory errors during encoding conversion.
- 6899be28908a 9.4.25 landed
- 677989cc0107 9.6.16 landed
- 54d641da0640 9.5.20 landed
- 226551e7c385 10.11 landed
- e5ff9757194b 11.6 landed
- 8e10405c7450 13.0 landed
- 8381242df587 12.1 landed
-
Allow repalloc() to give back space when a large chunk is downsized.
- 4829576ba44b 9.4.25 landed
- e5e4f12a5f85 9.6.16 landed
- c477f3e449d1 13.0 landed
- 9ad1b572d8b7 10.11 landed
- 9a407209a075 12.1 landed
- 82d0a46ea32d 11.6 landed
- 1534531fe74f 9.5.20 landed