Re: allocation limit for encoding conversion

Alvaro Herrera <alvherre@2ndquadrant.com>

From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: pgsql-hackers@lists.postgresql.org
Date: 2019-08-16T18:35:09Z
Lists: pgsql-hackers
On 2019-Aug-16, Alvaro Herrera wrote:

> Somebody ran into issues when generating large XML output (upwards of
> 256 MB) and then sending via a connection with a different
> client_encoding.

ref: https://postgr.es/m/43a889a1-45fb-1d60-31ae-21e607307492@gmail.com
(pgsql-es-ayuda)

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Commits

  1. Avoid unnecessary out-of-memory errors during encoding conversion.

  2. Allow repalloc() to give back space when a large chunk is downsized.