Re: [bug report] The backend process cannot reuse VfdCache cache entries

Heikki Linnakangas <hlinnaka@iki.fi>

From: Heikki Linnakangas <hlinnaka@iki.fi>
To: dengkai <784523565@qq.com>, pgsql-bugs <pgsql-bugs@lists.postgresql.org>
Date: 2026-05-13T13:41:40Z
Lists: pgsql-bugs
On 13/05/2026 16:06, dengkai wrote:
> Recently, in a production environment, we encountered the following SQL 
> error:
> `ERROR: dn_6001_6002: dn_6011_6012: invalid memory alloc request size 
> 1174405120 in fd.cpp:1094`
> Based on this error message, the database was trying to allocate a 
> VfdCache of size 1174405120 bytes, which exceeds the maximum allowable 
> memory space `maxCacheSize` for a single allocation.

There is no file called "fd.cpp" or variable called "maxCacheSize" in 
PostgreSQL.

There is code like that in fd.c to expand the VfdCache, but it uses 
realloc() for the allocation, which can go beyond the 1 GB limit.

In other words, you've hit a bug on something other than PostgreSQL.

- Heikki