Hi,
I've rebased and updated the patch with some fixes:
- Removed volatile
- Switched from spinlock to LWLock and removed n_writer
- Moved postgres.h as first header on all files
- Removed possible allocations in PG_CATCH. Though I would probably need to run some more thorough tests on this
I should also have the GitHub repository version of the extension ready this week.
Regards,
Anthonin
Hi Anthonin,
> [...]
>
> The usual approach is to have pre-allocated memory. This must actually be written (zeroed usually) or it might be lazily allocated only on page fault. And it can't be copy on write memory allocated once in postmaster startup then inherited by fork.
>
> That imposes an overhead for every single postgres backend. So maybe there's a better solution.
It looks like the patch rotted a bit, see cfbot. Could you please
submit an updated version?
Best regards,
Aleksander Alekseev (wearing co-CFM hat)