Skip to content

Conversation

@ibrarahmad
Copy link
Contributor

Fix hash table removal during iteration to prevent corruption. Use PostgreSQL-style single-pass removal for full flushes and two-pass approach for partial removals. Add error checking for hash_search(HASH_REMOVE) operations.

Add NULL checks for HASH_FIXED_SIZE hash tables that can return NULL when full to prevent dereferencing NULL pointers.

Add spinlock protection for reading counter values to prevent torn reads of 64-bit counters.

Fix hash table removal during iteration to prevent corruption.
Use PostgreSQL-style single-pass removal for full flushes and
two-pass approach for partial removals. Add error checking for
hash_search(HASH_REMOVE) operations.

Add NULL checks for HASH_FIXED_SIZE hash tables that can return
NULL when full to prevent dereferencing NULL pointers.

Add spinlock protection for reading counter values to prevent torn
reads of 64-bit counters.
@ibrarahmad
Copy link
Contributor Author

Check PR for discussion.

@mason-sharp mason-sharp merged commit f1e4f71 into pgEdge:main Jan 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants