
AI Summary
ClickHouse has launched pg_re2, a new Postgres extension using Google's RE2 library to prevent regex-based database crashes, trading some advanced matching features for guaranteed linear performance.
- •ClickHouse released pg_re2, a Postgres extension that integrates the Google RE2 engine for regular expression handling.
- •The extension aims to prevent 'catastrophic backtracking,' a common vulnerability in standard regex engines like PCRE that can crash databases.
- •Developers on Hacker News noted that while RE2 is safer, it lacks support for complex features like backreferences present in standard Postgres regex.
- •The long-term impact on production database stability remains to be seen as users test the extension's compatibility with existing regex workloads.
ClickHouse has introduced pg_re2, an open-source extension that replaces the standard Postgres regex engine with Google's RE2 library. Unlike the default library, which uses NFA/DFA hybrid models that can hang under specific input patterns, RE2 guarantees linear time performance. However, this safety comes at the cost of abandoning certain advanced regex features that Postgres users currently rely on. Widespread adoption will depend on whether teams prioritize protection against engine-based crashes over support for complex pattern matching.
Sources
Topics
Get the story before everyone else.
1-minute briefings. Zero noise. Straight to your inbox.
Join 1,200+ readers
Discussion
No comments yet. Be the first to start the conversation!