Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Memory safety Remove topic Memory safety Clear all 1 posts RSS

Wednesday, Sep 30

ClickHouse

Memory safety for Postgres extensions in C/C++

Case study 4 min +40 XP

Postgres's palloc/MemoryContext allocation and setjmp/longjmp-based error handling clash with C++ new/delete, destructors and exceptions: longjmp skips destructors (undefined behavior), exceptions bypass PG_CATCH, and an uncaught exception aborts the process and forces cluster-wide crash recovery.

The quest for software engineering knowledge.

Look:
Layout: