Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wIWdZ-008Au3-23 for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Apr 2026 19:01:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wIWdY-008Ung-2g for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Apr 2026 19:01:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wIWdY-008UnX-0q for pgsql-hackers@lists.postgresql.org; Thu, 30 Apr 2026 19:01:24 +0000 Received: from mail-vs1-xe2b.google.com ([2607:f8b0:4864:20::e2b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wIWdR-00000003YqJ-0RoC for pgsql-hackers@lists.postgresql.org; Thu, 30 Apr 2026 19:01:23 +0000 Received: by mail-vs1-xe2b.google.com with SMTP id ada2fe7eead31-606045ef716so797435137.0 for ; Thu, 30 Apr 2026 12:01:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1777575676; cv=none; d=google.com; s=arc-20240605; b=bTkXR117gqki/eBctiaWzXuGX/YUJflrQfjwdx3HtjQgak+VIH5SyhXVS0OvIJDgM8 yhM2bTx2zmuZdQtNYWQuCX/HxzG/Ti6TrGUfJFrbBxGnjOvUCVZ95X1OrTXYCGw1vRnw Exwj9kwDprLgB3CBkjAFiovc6IBHv4TGLU62BYwxprOq767tQJcdjSkItrytpCfxORp5 CWUda74gGxKpRSUsw5JWn0+6SQvmdI6suCTUDBcEkEajjCdomwe31zw9yfS92uLKL2uS C3crliYYC64YJNKIm13NCgf7DPs0a7h32LFTQO37AB0VXbpzNcKYMAX6ePN1F9xecEk8 0nAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=RJC0xrvDfNmTcgXuhlGK7rR9G2RkXtgwMhz9TTIzt8k=; fh=aLFlIwLRhjJ62Oi7jfh17CC0bv2ps6dnSrUZCg2hAeg=; b=J6L+YGvoHnq8jroIxteNXodSOU0T+GxE+YCHbM334RRkW6+UZJuC2clOjhQFq6SR2G q/ADfNO1PvqZaA3A4uaMs0XzUm4fpbCd7zIUG6FhglbCV99sQGhhMKe7bjLpbIKz6Njy DKfZ/5u8UwzQY5a+7G+wXmJfdMtS8l2ZspDdXxQE/zxf6ihl4MJwI4YJRxDSm5wU1dzB v3bmlhHRcabudI2SwIBscWFcjcVHY3oYJZdSKv/Ow6bVj0DHqiKmODvVylDfL3I9Ca9Z rI6E8GB93t8e2ELH0fqcHS368Lt60kJhSdT3+cn9up8LfRqNiPzKJrv0iSH6MmxPvuba A7ww==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777575676; x=1778180476; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=RJC0xrvDfNmTcgXuhlGK7rR9G2RkXtgwMhz9TTIzt8k=; b=ejFD7+AzRmAECGKx/nNXjEuMW4GvRVLMUcBALEOsVbRhc7jkT3oHhk50RLbIkoqjzd R3QH8lNm3G2iJBPXoQ2TLJ3iF6R8w/RTE2KrmbzhDkU0gbBr93Fegf7NeUyWU7okljL7 X5ETF3+zebdp7sP6n8ujTp1Y3ap0nM/GuQd0oZqcWX1tIfd0IYZgcr0e1SyADZ9LdiRH 6GfDh15jtHu/mRSS9UBCG0owkMGxYB7e4GkOohmDn4PUl3kF08AVTuZDYPVa5D2j+jg+ kvFRU27gVZPMyQR5bFrFUTc1RpctSrD3ob+nSyEmxfp2TjDIGkkJDs5QS5VIsU1GoQyL oSng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777575676; x=1778180476; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=RJC0xrvDfNmTcgXuhlGK7rR9G2RkXtgwMhz9TTIzt8k=; b=BKEb7RH4kgRgtNe2FKoa/v/DU9AmTJQR9N7Jj9sCTK4VkLsenO0aqWUXYZFgGSeZ46 M2fPLSjBzoqnDMUbmPkCu1HXYDDyVXvAWO+1X+xxTOqs1j9G3BqVtd6yImlYjgZS8x8h 7+YIC6a4YD4uo3K74P8LrMe1mG+7IBHiNIWMw9Ob1M+rsE1aSAhknVXXGVCzXEe7Ak9P WgRAl4xpFYmVASRC2vBIKJmeRqZLd4d2I1ilxMWGkTEYt1ZAnzPbJcnH4m0g6EAFuuA0 JYBbGing+kbXbBUCKl7PZqs+XwjgFw3GniJ9dAbtCjScZFNWQmoKUdS9BWvaEjk0DdSd P7Zw== X-Gm-Message-State: AOJu0Yy07irgq0eJZHGIrzOR1hRQ0nOcHL3cvtSRzmoiJpylgt5AzzQZ pImc+gtg7NbHCZZj1zRVJSUUAlVzn5AVqI7ZVBx0WGA9j3M9Z9Bgcx6pcHbf9S4w4DHcIRVeTQ+ wGKTmFFuX+/8VdjfjnpdM5jJd0LCbi20sGLW5 X-Gm-Gg: AeBDieuF1cZzkSLVb06SxF8rCJcni0hMT3v9cRUknHqRDxnzcj2sCNFzuam5YGnQfyh gHr/QmYDQ1nOpBccF7pTtQSBR8ozQekrTkfx/SGqOTiA6SqHxRkeGV5JEp7A10JakGjTs3jqCvH qPS5HimMJ1qm5+jyp46tHPRIjOjcjzsTHMkn+42gHF2ZwmSapv5wPiUw8elQ5iyelrjXn0lVuvX u7HWM1/AWMh5FZRRyEHStjPlBAU7DVnud7m1cJkeRYKSMuLLI1VG2Fi93sfE0VZIaTD23J9BIen vR8aXvDvElkouXM= X-Received: by 2002:a05:6102:1489:b0:602:b037:4de8 with SMTP id ada2fe7eead31-62ad1d38393mr2803122137.4.1777575676204; Thu, 30 Apr 2026 12:01:16 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: SATYANARAYANA NARLAPURAM Date: Thu, 30 Apr 2026 12:01:04 -0700 X-Gm-Features: AVHnY4LTreyS2YNCsfZz0g0Ew2_kE3-GvGeL6HaKui52t1X8RoJ5aaK-dztg8QQ Message-ID: Subject: Re: Limit GRAPH_TABLE path combinations to prevent memory exhaustion To: Ashutosh Bapat Cc: PostgreSQL Hackers Content-Type: multipart/mixed; boundary="000000000000bded070650b2165f" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000bded070650b2165f Content-Type: multipart/alternative; boundary="000000000000bded060650b2165d" --000000000000bded060650b2165d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Thu, Apr 30, 2026 at 12:16=E2=80=AFAM Ashutosh Bapat < ashutosh.bapat.oss@gmail.com> wrote: > On Wed, Apr 29, 2026 at 10:05=E2=80=AFPM SATYANARAYANA NARLAPURAM > wrote: > > > > Hi hackers, > > > > generate_queries_for_path_pattern_recurse() enumerates all path > > combinations by recursing over the Cartesian product of matching elemen= ts > > per pattern position. Without IS label filters, each position matches > > ALL tables of that kind, leading to N^K combinations (N tables, K > > pattern positions). Each combination allocates a Query node via palloc > > causing unbounded memory growth. > > > > A 8-table graph with a -element pattern reaches 81.3 GB RES in a few > seconds > > before I cancel the query. Tests in the patch (those were failed) can > reproduce the problem > > without the fix included in the patch. > > > > top - 15:04:19 up 43 days, 19:18, 5 users, load average: 0.43, 0.19, > 0.08 > > Tasks: 1 total, 1 running, 0 sleeping, 0 stopped, 0 zombie > > %Cpu(s): 0.9 us, 0.8 sy, 0.0 ni, 98.3 id, 0.0 wa, 0.0 hi, 0.0 si, > 0.0 st > > MiB Mem : 515766.2 total, 248412.7 free, 234847.7 used, 48014.7 > buff/cache > > MiB Swap: 0.0 total, 0.0 free, 0.0 used. 280918.6 avail > Mem > > > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ > COMMAND > > 649642 azureus+ 20 0 212.2g 81.3g 33948 R 100.0 16.1 0:41.20 > postgres > > > > I tried to reproduce this problem on my laptop with queries included > in the patch. For me all the queries finished. First within 4 ms, > second within 133 ms and the third in 12ms. Did you try with more > edges or more rows in the tables? > > > > > As a POC I added a pre-computation check that calculates the total numb= er > > of path combinations before entering the > generate_queries_for_path_pattern_recurse. > > If the product exceeds MAX_GRAPH_TABLE_PATH_COMBINATIONS (set to 10,000= ), > > the rewriter reports ERRCODE_PROGRAM_LIMIT_EXCEEDED with a hint > suggesting > > IS label filters to reduce the search space. The limit of 10,000 is > somewhat arbitrary > > but conservative. It caps memory at roughly 5 MB of Query nodes. > > Patterns that would exceed the limit without labels can always be made > to succeed > > by adding IS expressions to pin specific positions to fewer tables. > > Alternatively, we can consider adding a GUC to control the limit but > appears > > to be an overkill. Thoughts? > > I understand the problem and can understand the pain. Somebody who is > writing a query like ()-()-()-()-() ... should know that every pattern > that doesn't have a label will be matched against each vertex/edge. > Our documentation makes it explicit [1] "The above patterns would > match any vertex, or any two vertices connected by any edge ... ". But > if they are really interested in matching every vertex or edge they > don't have any other choice. Using restrictive label expressions would > lead to wrong or incomplete results. If they can use label expressions > they should do so anyway, otherwise they will end up with incorrect > results. To me it seems like somebody who is writing such a pattern > without providing enough resources is writing a bad query. > > We have other places where queries can consume large amounts of memory > during planning or execution. Simply take the SQL query equivalent to > the above pattern. We do not have a way to prohibit such queries as > far as I know. I understand that SQL/PGQ makes it easy to write such > queries by hand. But that seems to be abusing a powerful tool. > > Another example is joining partitioned tables with thousands of > partitions. We have a GUC which enables or disables partitionwise join > but there is no GUC to limit the number of tables or partitions being > joined. > > I think we can document that such a pattern can result in large > queries which may consume memory. > > Said that 81.3 GB looks unreasonably large for > generate_queries_for_path_pattern_recurse() alone. I guess a large > portion of it comes from planning and execution. How many rows did > those tables had? Which phase of query execution consumed that much > memory? Do you have a dump of memory contexts when it reaches that > limit? > I am worried about a potential DOS by a low privileged user or an accidental query causing OOM. Please find the attached patch that added traces to print the memory context. Patch also includes CFI to cancel the query which we didn't have earlier. You can see traces like below once you run the repro: 2026-04-30 18:43:51.268 UTC [927121] LOG: GRAPH_TABLE: before generate_queries_for_path_pattern_recurse, current memory context "MessageContext": 39392903168 bytes total 2026-04-30 18:43:51.268 UTC [927121] STATEMENT: SELECT count(*) FROM GRAPH_TABLE (g5 MATCH (a)-[e1]->(b)-[e2]->(c)-[e3]->(d)-[e4]->(e) COLUMNS ( a.id AS aid)); 2026-04-30 18:43:51.268 UTC [927121] ERROR: canceling statement due to user request 2026-04-30 18:43:51.268 UTC [927121] STATEMENT: SELECT count(*) FROM GRAPH_TABLE (g5 MATCH (a)-[e1]->(b)-[e2]->(c)-[e3]->(d)-[e4]->(e) COLUMNS ( a.id AS aid)); Repro: CREATE temp TABLE v1 (id int PRIMARY KEY, val int); CREATE temp TABLE v2 (id int PRIMARY KEY, val int); CREATE temp TABLE v3 (id int PRIMARY KEY, val int); CREATE temp TABLE v4 (id int PRIMARY KEY, val int); CREATE temp TABLE v5 (id int PRIMARY KEY, val int); CREATE temp TABLE v6 (id int PRIMARY KEY, val int); CREATE temp TABLE v7 (id int PRIMARY KEY, val int); CREATE temp TABLE v8 (id int PRIMARY KEY, val int); CREATE temp TABLE e1 (id int PRIMARY KEY, src int, dest int); CREATE temp TABLE e2 (id int PRIMARY KEY, src int, dest int); CREATE temp TABLE e3 (id int PRIMARY KEY, src int, dest int); CREATE temp TABLE e4 (id int PRIMARY KEY, src int, dest int); CREATE temp TABLE e5 (id int PRIMARY KEY, src int, dest int); CREATE temp TABLE e6 (id int PRIMARY KEY, src int, dest int); CREATE temp TABLE e7 (id int PRIMARY KEY, src int, dest int); CREATE temp TABLE e8 (id int PRIMARY KEY, src int, dest int); CREATE PROPERTY GRAPH g5 VERTEX TABLES ( v1 LABEL vl PROPERTIES (id, val) LABEL vl2 PROPERTIES (id, val), v2 LABEL vl PROPERTIES (id, val), v3 LABEL vl PROPERTIES (id, val), v4 LABEL vl PROPERTIES (id, val), v5 LABEL vl PROPERTIES (id, val), v6 LABEL vl PROPERTIES (id, val), v7 LABEL vl PROPERTIES (id, val), v8 LABEL vl PROPERTIES (id, val) ) EDGE TABLES ( e1 SOURCE KEY (src) REFERENCES v1 (id) DESTINATION KEY (dest) REFERENCES v2 (id) LABEL el PROPERTIES (id), e2 SOURCE KEY (src) REFERENCES v2 (id) DESTINATION KEY (dest) REFERENCES v3 (id) LABEL el PROPERTIES (id), e3 SOURCE KEY (src) REFERENCES v3 (id) DESTINATION KEY (dest) REFERENCES v4 (id) LABEL el PROPERTIES (id), e4 SOURCE KEY (src) REFERENCES v4 (id) DESTINATION KEY (dest) REFERENCES v5 (id) LABEL el PROPERTIES (id), e5 SOURCE KEY (src) REFERENCES v5 (id) DESTINATION KEY (dest) REFERENCES v6 (id) LABEL el PROPERTIES (id), e6 SOURCE KEY (src) REFERENCES v6 (id) DESTINATION KEY (dest) REFERENCES v7 (id) LABEL el PROPERTIES (id), e7 SOURCE KEY (src) REFERENCES v7 (id) DESTINATION KEY (dest) REFERENCES v8 (id) LABEL el PROPERTIES (id), e8 SOURCE KEY (src) REFERENCES v8 (id) DESTINATION KEY (dest) REFERENCES v1 (id) LABEL el PROPERTIES (id) ); SELECT count(*) FROM GRAPH_TABLE (g5 MATCH (a)-[e1]->(b)-[e2]->(c)-[e3]->(d)-[e4]->(e) COLUMNS (a.id AS aid)); --000000000000bded060650b2165d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

On Thu, Apr 30, = 2026 at 12:16=E2=80=AFAM Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> wrote:
On Wed, Apr 29, 2026 at 10:05= =E2=80=AFPM SATYANARAYANA NARLAPURAM
<satyanar= lapuram@gmail.com> wrote:
>
> Hi hackers,
>
> generate_queries_for_path_pattern_recurse() enumerates all path
> combinations by recursing over the Cartesian product of matching eleme= nts
> per pattern position.=C2=A0 Without IS label filters, each position ma= tches
> ALL tables of that kind, leading to N^K combinations (N tables, K
> pattern positions).=C2=A0 Each combination allocates a Query node via = palloc
> causing unbounded memory growth.
>
> A 8-table graph with a -element pattern reaches 81.3 GB RES in a few s= econds
> before I cancel the query. Tests in the patch (those were failed) can = reproduce the problem
> without the fix included in the patch.
>
> top - 15:04:19 up 43 days, 19:18,=C2=A0 5 users,=C2=A0 load average: 0= .43, 0.19, 0.08
> Tasks:=C2=A0 =C2=A01 total,=C2=A0 =C2=A01 running,=C2=A0 =C2=A00 sleep= ing,=C2=A0 =C2=A00 stopped,=C2=A0 =C2=A00 zombie
> %Cpu(s):=C2=A0 0.9 us,=C2=A0 0.8 sy,=C2=A0 0.0 ni, 98.3 id,=C2=A0 0.0 = wa,=C2=A0 0.0 hi,=C2=A0 0.0 si,=C2=A0 0.0 st
> MiB Mem : 515766.2 total, 248412.7 free, 234847.7 used,=C2=A0 48014.7 = buff/cache
> MiB Swap:=C2=A0 =C2=A0 =C2=A0 0.0 total,=C2=A0 =C2=A0 =C2=A0 0.0 free,= =C2=A0 =C2=A0 =C2=A0 0.0 used. 280918.6 avail Mem
>
>=C2=A0 =C2=A0 =C2=A0PID USER=C2=A0 =C2=A0 =C2=A0 PR=C2=A0 NI=C2=A0 =C2= =A0 VIRT=C2=A0 =C2=A0 RES=C2=A0 =C2=A0 SHR S=C2=A0 %CPU=C2=A0 %MEM=C2=A0 = =C2=A0 =C2=A0TIME+ COMMAND
>=C2=A0 649642 azureus+=C2=A0 20=C2=A0 =C2=A00=C2=A0 212.2g=C2=A0 81.3g= =C2=A0 33948 R 100.0=C2=A0 16.1=C2=A0 =C2=A00:41.20 postgres
>

I tried to reproduce this problem on my laptop with queries included
in the patch. For me all the queries finished. First within 4 ms,
second within 133 ms and the third in 12ms. Did you try with more
edges or more rows in the tables?

>
> As a POC I added a pre-computation check that calculates the total num= ber
> of path combinations before entering the generate_queries_for_path_pat= tern_recurse.
> If the product exceeds MAX_GRAPH_TABLE_PATH_COMBINATIONS (set to 10,00= 0),
> the rewriter reports ERRCODE_PROGRAM_LIMIT_EXCEEDED with a hint sugges= ting
> IS label filters to reduce the search space. The limit of 10,000 is so= mewhat arbitrary
> but conservative. It caps memory at roughly 5 MB of Query nodes.
> Patterns that would exceed the limit without labels can always be made= to succeed
> by adding IS expressions to pin specific positions to fewer tables. > Alternatively, we can consider adding a GUC to control the limit but a= ppears
> to be an overkill. Thoughts?

I understand the problem and can understand the pain. Somebody who is
writing a query like ()-()-()-()-() ... should know that every pattern
that doesn't have a label will be matched against each vertex/edge.
Our documentation makes it explicit [1] "The above patterns would
match any vertex, or any two vertices connected by any edge ... ". But=
if they are really interested in matching every vertex or edge they
don't have any other choice. Using restrictive label expressions would<= br> lead to wrong or incomplete results. If they can use label expressions
they should do so anyway, otherwise they will end up with incorrect
results. To me it seems like somebody who is writing such a pattern
without providing enough resources is writing a bad query.

We have other places where queries can consume large amounts of memory
during planning or execution. Simply take the SQL query equivalent to
the above pattern. We do not have a way to prohibit such queries as
far as I know. I understand that SQL/PGQ makes it easy to write such
queries by hand. But that seems to be abusing a powerful tool.

Another example is joining partitioned tables with thousands of
partitions. We have a GUC which enables or disables partitionwise join
but there is no GUC to limit the number of tables or partitions being
joined.

I think we can document that such a pattern can result in large
queries which may consume memory.

Said that 81.3 GB looks unreasonably large for
generate_queries_for_path_pattern_recurse() alone. I guess a large
portion of it comes from planning and execution. How many rows did
those tables had? Which phase of query execution consumed that much
memory? Do you have a dump of memory contexts when it reaches that
limit?

I am worried about a potential D= OS by a low privileged user or an accidental query
causing OOM.= =C2=A0
Please find the attached patch that added traces to print = the memory context.
Patch also includes CFI to cancel the query w= hich we didn't have earlier.

You can see trace= s like below once you run the repro:

2026-04-30 18= :43:51.268 UTC [927121] LOG: =C2=A0GRAPH_TABLE: before generate_queries_for= _path_pattern_recurse, current memory context "MessageContext": 3= 9392903168 bytes total
2026-04-30 18:43:51.268 UTC [927121] STATEMENT: = =C2=A0SELECT count(*) FROM GRAPH_TABLE (g5 MATCH (a)-[e1]->(b)-[e2]->= (c)-[e3]->(d)-[e4]->(e) COLUMNS (a.id AS = aid));
2026-04-30 18:43:51.268 UTC [927121] ERROR: =C2=A0canceling state= ment due to user request
2026-04-30 18:43:51.268 UTC [927121] STATEMENT:= =C2=A0SELECT count(*) FROM GRAPH_TABLE (g5 MATCH (a)-[e1]->(b)-[e2]->= ;(c)-[e3]->(d)-[e4]->(e) COLUMNS (a.id AS= aid));
=C2=A0
Repro:
CREATE temp TABLE v1 (i= d int PRIMARY KEY, val int);
CREATE temp TABLE v2 (id int PRIMARY KEY, v= al int);
CREATE temp TABLE v3 (id int PRIMARY KEY, val int);
CREATE t= emp TABLE v4 (id int PRIMARY KEY, val int);
CREATE temp TABLE v5 (id int= PRIMARY KEY, val int);
CREATE temp TABLE v6 (id int PRIMARY KEY, val in= t);
CREATE temp TABLE v7 (id int PRIMARY KEY, val int);
CREATE temp T= ABLE v8 (id int PRIMARY KEY, val int);
CREATE temp TABLE e1 (id int PRIM= ARY KEY, src int, dest int);
CREATE temp TABLE e2 (id int PRIMARY KEY, s= rc int, dest int);
CREATE temp TABLE e3 (id int PRIMARY KEY, src int, de= st int);
CREATE temp TABLE e4 (id int PRIMARY KEY, src int, dest int);CREATE temp TABLE e5 (id int PRIMARY KEY, src int, dest int);
CREATE t= emp TABLE e6 (id int PRIMARY KEY, src int, dest int);
CREATE temp TABLE = e7 (id int PRIMARY KEY, src int, dest int);
CREATE temp TABLE e8 (id int= PRIMARY KEY, src int, dest int);
CREATE PROPERTY GRAPH g5
=C2=A0 =C2= =A0 VERTEX TABLES (
=C2=A0 =C2=A0 =C2=A0 =C2=A0 v1 LABEL vl PROPERTIES (= id, val) LABEL vl2 PROPERTIES (id, val),
=C2=A0 =C2=A0 =C2=A0 =C2=A0 v2 = LABEL vl PROPERTIES (id, val),
=C2=A0 =C2=A0 =C2=A0 =C2=A0 v3 LABEL vl P= ROPERTIES (id, val),
=C2=A0 =C2=A0 =C2=A0 =C2=A0 v4 LABEL vl PROPERTIES = (id, val),
=C2=A0 =C2=A0 =C2=A0 =C2=A0 v5 LABEL vl PROPERTIES (id, val),=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 v6 LABEL vl PROPERTIES (id, val),
=C2=A0= =C2=A0 =C2=A0 =C2=A0 v7 LABEL vl PROPERTIES (id, val),
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 v8 LABEL vl PROPERTIES (id, val)
=C2=A0 =C2=A0 )
=C2=A0= =C2=A0 EDGE TABLES (
=C2=A0 =C2=A0 =C2=A0 =C2=A0 e1 SOURCE KEY (src) RE= FERENCES v1 (id) DESTINATION KEY (dest) REFERENCES v2 (id) LABEL el PROPERT= IES (id),
=C2=A0 =C2=A0 =C2=A0 =C2=A0 e2 SOURCE KEY (src) REFERENCES v2 = (id) DESTINATION KEY (dest) REFERENCES v3 (id) LABEL el PROPERTIES (id),=C2=A0 =C2=A0 =C2=A0 =C2=A0 e3 SOURCE KEY (src) REFERENCES v3 (id) DESTINA= TION KEY (dest) REFERENCES v4 (id) LABEL el PROPERTIES (id),
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 e4 SOURCE KEY (src) REFERENCES v4 (id) DESTINATION KEY (d= est) REFERENCES v5 (id) LABEL el PROPERTIES (id),
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 e5 SOURCE KEY (src) REFERENCES v5 (id) DESTINATION KEY (dest) REFERE= NCES v6 (id) LABEL el PROPERTIES (id),
=C2=A0 =C2=A0 =C2=A0 =C2=A0 e6 SO= URCE KEY (src) REFERENCES v6 (id) DESTINATION KEY (dest) REFERENCES v7 (id)= LABEL el PROPERTIES (id),
=C2=A0 =C2=A0 =C2=A0 =C2=A0 e7 SOURCE KEY (sr= c) REFERENCES v7 (id) DESTINATION KEY (dest) REFERENCES v8 (id) LABEL el PR= OPERTIES (id),
=C2=A0 =C2=A0 =C2=A0 =C2=A0 e8 SOURCE KEY (src) REFERENCE= S v8 (id) DESTINATION KEY (dest) REFERENCES v1 (id) LABEL el PROPERTIES (id= )
=C2=A0 =C2=A0 );

SELECT count(*) FROM GRA= PH_TABLE (g5 MATCH (a)-[e1]->(b)-[e2]->(c)-[e3]->(d)-[e4]->(e) = COLUMNS (a.id AS aid));
--000000000000bded060650b2165d-- --000000000000bded070650b2165f Content-Type: application/octet-stream; name="0001-Add-memory-context-debugging-for-GRAPH_TABLE-path-ge.patch" Content-Disposition: attachment; filename="0001-Add-memory-context-debugging-for-GRAPH_TABLE-path-ge.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_moluhkju0 ZGlmZiAtLWdpdCBhL3NyYy9iYWNrZW5kL3Jld3JpdGUvcmV3cml0ZUdyYXBoVGFibGUuYyBiL3Ny Yy9iYWNrZW5kL3Jld3JpdGUvcmV3cml0ZUdyYXBoVGFibGUuYwppbmRleCA2ODY3ZGU2ZC4uOWIy NWZlNmYgMTAwNjQ0Ci0tLSBhL3NyYy9iYWNrZW5kL3Jld3JpdGUvcmV3cml0ZUdyYXBoVGFibGUu YworKysgYi9zcmMvYmFja2VuZC9yZXdyaXRlL3Jld3JpdGVHcmFwaFRhYmxlLmMKQEAgLTQyLDYg KzQyLDcgQEAKICNpbmNsdWRlICJ1dGlscy9idWlsdGlucy5oIgogI2luY2x1ZGUgInV0aWxzL2Zt Z3JvaWRzLmgiCiAjaW5jbHVkZSAidXRpbHMvbHN5c2NhY2hlLmgiCisjaW5jbHVkZSAidXRpbHMv bWVtdXRpbHMuaCIKICNpbmNsdWRlICJ1dGlscy9ydWxldXRpbHMuaCIKICNpbmNsdWRlICJ1dGls cy9zeXNjYWNoZS5oIgogCkBAIC0zNDIsNyArMzQzLDYgQEAgZ2VuZX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