Re: Row pattern recognition

From: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
To: champion(dot)p(at)gmail(dot)com
Cc: er(at)xs4all(dot)nl, vik(at)postgresfriends(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Row pattern recognition
Date: 2023-09-25 05:26:30
Message-ID: 20230925.142630.2110423514166104754.t-ishii@sranhm.sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Fri, Sep 22, 2023, 3:13 AM Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp> wrote:
>
>> > Op 9/22/23 om 07:16 schreef Tatsuo Ishii:
>> >>> Attached is the fix against v6 patch. I will include this in upcoming
>> >>> v7 patch.
>> >> Attached is the v7 patch. It includes the fix mentioned above. Also
>> > (Champion's address bounced; removed)
>>
>> On my side his adress bounced too:-<
>>
>
> Yep. I'm still here, just lurking for now. It'll take a little time for me
> to get back to this thread, as my schedule has changed significantly. :D

Hope you get back soon...

By the way, I was thinking about eliminating recusrive calls in
pattern matching. Attached is the first cut of the implementation. In
the attached v8 patch:

- No recursive calls anymore. search_str_set_recurse was removed.

- Instead it generates all possible pattern variable name initial
strings before pattern matching. Suppose we have "ab" (row 0) and
"ac" (row 1). "a" and "b" represents the pattern variable names
which are evaluated to true. In this case it will generate "aa",
"ac", "ba" and "bc" and they are examined by do_pattern_match one by
one, which performs pattern matching.

- To implement this, an infrastructure string_set* are created. They
take care of set of StringInfo.

I found that the previous implementation did not search all possible
cases. I believe the bug is fixed in v8.

Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp

Attachment Content-Type Size
v8-0001-Row-pattern-recognition-patch-for-raw-parser.patch text/x-patch 21.1 KB
v8-0002-Row-pattern-recognition-patch-parse-analysis.patch text/x-patch 11.6 KB
v8-0003-Row-pattern-recognition-patch-planner.patch text/x-patch 4.8 KB
v8-0004-Row-pattern-recognition-patch-executor.patch text/x-patch 39.5 KB
v8-0005-Row-pattern-recognition-patch-docs.patch text/x-patch 8.2 KB
v8-0006-Row-pattern-recognition-patch-tests.patch text/x-patch 35.2 KB
v8-0007-Allow-to-print-raw-parse-tree.patch text/x-patch 749 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hayato Kuroda (Fujitsu) 2023-09-25 05:35:18 RE: pg_upgrade and logical replication
Previous Message Ryoga Yoshida 2023-09-25 05:16:22 Re: Doesn't pgstat_report_wal() handle the argument "force" incorrectly