A simple query "insert into mytable default values" on a single serial-column table also leaks. It can also produced by pgbench. On Windows and Linux too.
>> Just to clarify, am I correct assuming that the issue does not affect >> tables which have non-indexed inet fields?
> Hmm, I think it might also affect queries that do large merge joins on > inet fields. Not sure about that. In any case, it's a memory leak that > gets cleared at the end of statement, so it can only become a problem > when dealing with large data sets.
The second test case I originally sent uses inet-functions in a complicated query, and it also shows the described behaviour.
So the problem is not limited to indexes, but also will appear in queries!