There already was a attempt to make this improvement, see [1]. There was a fairly long discussion about how to best do that (using other data structure, not just a simple array). It kinda died about a year ago, but I suppose there's a lot of relevant info in that thread.
Thanks for the pointer, wow that's a long thread. For some reason it did not consider lifting the INT_MAX tuples/12GB limitation. I'll see if I can pick up where that thread left off and push it along.
From:
Dave Cramer Date: Subject:
Re: let's make the list of reportable GUCs configurable (was Re: Add%r substitution for psql prompts to show recovery status)