We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7577b6 commit ed3ed3dCopy full SHA for ed3ed3d
pglite-wasm/pg_main.c
@@ -28,7 +28,18 @@
28
29
// globals
30
31
-#define MemoryContextResetAndDeleteChildren(...)
+/*
32
+ * Ensure MessageContext and its children are actually cleared between
33
+ * queries. Leaving this as a no-op causes unbounded growth in
34
+ * MessageContext when large query strings or parameters are processed,
35
+ * eventually exhausting memory.
36
+ */
37
+#undef MemoryContextResetAndDeleteChildren
38
+#define MemoryContextResetAndDeleteChildren(ctx) \
39
+ do { \
40
+ MemoryContextDeleteChildren((ctx)); \
41
+ MemoryContextReset((ctx)); \
42
+ } while (0)
43
// #define SpinLockInit(...)
44
45
0 commit comments