Is this a good idea? If the caller of this code has no respect for work_mem, they are still going to blow it out of the water. Now we will just do a bunch of hash-table splitting in the process. That is only going to add to the pain.
Also:
* false if it existed already. ->additional_data in the new entry has
The field is just ->additional, not ->additional_data