Re: regex cache - Mailing list pgsql-hackers

From Tom Lane
Subject Re: regex cache
Date
Msg-id 21213.1213766836@sss.pgh.pa.us
Whole thread Raw
In response to regex cache  (Josh Berkus <josh@agliodbs.com>)
Responses Re: regex cache  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
Josh Berkus <josh@agliodbs.com> writes:
> I'm doing some analysis of PostgreSQL site traffic, and am being frequently 
> hung up by the compile-time-fixed size of our regex cache (32 regexes, per 
> MAX_CACHED_RES).  Is there a reason why it would be hard to use work_mem 
> or some other dynamically changeable limit for regex caching?  

Hmmm ... Spencer's regex library makes a point of hiding its internal
representation of a compiled regex from the calling code.  So measuring
the size of the regex cache in bytes would involve doing a lot of
violence to that API.  We could certainly allow the size of the cache
measured in number-of-regexes to be controlled, though.

Having said that, I'm not sure it'd help your problem.  If your query is
using more than 32 regexes concurrently, it likely is using $BIGNUM
regexes concurrently.  How do we fix that?
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Tom Dunstan"
Date:
Subject: Re: Crash in pgCrypto?
Next
From: Simon Riggs
Date:
Subject: Re: Cleaning up cross-type arithmetic operators