Re: Row pattern recognition

From: Jacob Champion <champion(dot)p(at)gmail(dot)com>
To: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
Cc: er(at)xs4all(dot)nl, vik(at)postgresfriends(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Row pattern recognition
Date: 2023-10-24 18:51:19
Message-ID: CAGu=u8gcyAQAsDLp-01R21=M4bpAiGP9PZz0OyiMo5_bM30PMA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Oct 21, 2023 at 7:39 PM Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp> wrote:
> Attached is the v10 patch. This version enhances the performance of
> pattern matching.

Nice! I've attached a couple of more stressful tests (window
partitions of 1000 rows each). Beware that the second one runs my
desktop out of memory fairly quickly with the v10 implementation.

I was able to carve out some time this week to implement a very basic
recursive NFA, which handles both the + and * qualifiers (attached).
It's not production quality -- a frame on the call stack for every row
isn't going to work -- but with only those two features, it's pretty
tiny, and it's able to run the new stress tests with no issue. If I
continue to have time, I hope to keep updating this parallel
implementation as you add features to the StringSet implementation,
and we can see how it evolves. I expect that alternation and grouping
will ratchet up the complexity.

Thanks!
--Jacob

Attachment Content-Type Size
recursive-backtrack.diff.txt text/plain 34.1 KB
long_tests.diff.txt text/plain 4.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2023-10-24 19:05:50 Re: Bug: RLS policy FOR SELECT is used to check new rows
Previous Message Robert Haas 2023-10-24 18:42:19 Re: Bug: RLS policy FOR SELECT is used to check new rows