public inbox for [email protected]
help / color / mirror / Atom feedFrom: =?ISO-8859-1?B?emVuZ21hbg==?= <[email protected]>
To: =?ISO-8859-1?B?QXNodXRvc2ggQmFwYXQ=?= <[email protected]>
Cc: =?ISO-8859-1?B?SnVud2FuZyBaaGFv?= <[email protected]>
Cc: =?ISO-8859-1?B?cGdzcWwtaGFja2Vycw==?= <[email protected]>
Cc: =?ISO-8859-1?B?UGV0ZXIgRWlzZW50cmF1dA==?= <[email protected]>
Cc: =?ISO-8859-1?B?QXl1c2ggVGl3YXJp?= <[email protected]>
Subject: Re: (SQL/PGQ) cache lookup failed for label
Date: Thu, 4 Jun 2026 22:07:19 +0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAExHW5sghW3VjxyQYwYaW4Q76ZEcrsCwd_AYcfPHKZFMWOHKrw@mail.gmail.com>
References: <[email protected]>
<CAExHW5v+0v8ZwDVdJF7p95cxXddLEjnQkT0RAVTPtW1NuaMO7A@mail.gmail.com>
<[email protected]>
<CAJTYsWV9uroc-1Gurh+UTbXQ2h3h-QRKYC+kHpAr9Y2GMyROBQ@mail.gmail.com>
<CAJTYsWXgD9SpR2XCkot4N5UpLCwf+_EvoRTJTEwhEm=RFEF2WQ@mail.gmail.com>
<CAEG8a3L9RTHSZ6uhyyRTB9T-hH4XZaRPCG_3zC3u-hBN0pfefQ@mail.gmail.com>
<CAJTYsWVfexEKBDfmEGZ9YCs8+Eca_zk1E7nnpjmYQvnny2WViA@mail.gmail.com>
<CAExHW5vyLHDw47+fs6Pt+CeFDN1Dhne+tHPjrJYOkkBpJ3Fhvw@mail.gmail.com>
<CAEG8a3+LEi8dN_8=K7kKo-X85SvKcy6VSPW7mXQboNwx4G+Kqw@mail.gmail.com>
<CAExHW5tyEXwxrb8-AZKx_G6fposscZRjEWs_31A06CYCC_hSLQ@mail.gmail.com>
<CAEG8a3KkZJaLNZcuEzUjJBropCpbRkYXyeoj+svaKvJVxQ9BcA@mail.gmail.com>
<CAJTYsWUufkJ8SB+S5rpbpkcpFFmR9y7xN9V8gcAMPexgJLL_6Q@mail.gmail.com>
<CAExHW5twGP5Zuk4Zch4kz8XDrSpckWQipMs=ysAj8GmqNa2FCQ@mail.gmail.com>
<CAExHW5sghW3VjxyQYwYaW4Q76ZEcrsCwd_AYcfPHKZFMWOHKrw@mail.gmail.com>
> For now I have added a test case exhibiting this behaviour. If we
> commit the test, somebody who comes across this behaviour will know
> why the current behaviour is the way it is and what's the way forward.
> But if we don't commit it, which is ok, they will consider this as
> buggy behaviour and report it. I am fine either way.
>
> As I mentioned earlier, I am creating patches for all outstanding
> issues from the same branch. So the patches attached here do not start
> from 0001, but they apply with git am on the latest master for me
> without any problem.
> 0005 - fixes `cache lookup failed for label`
> 0006 - fixes empty label expression and view behaviour
> 0007 - issue with labels shared by vertex and edges
Hi Ashutosh,
I applied and tested the v20260601 patches on top of master, looks good.
One thing I noticed though -- RemoveRelations() in propgraphcmds.c
cleans up orphaned pg_propgraph_property entries, but the condition
doesn't include drop_label:
```diff
diff --git a/src/backend/commands/propgraphcmds.c b/src/backend/commands/propgraphcmds.c
index cc516e27020..7c8f397afbf 100644
--- a/src/backend/commands/propgraphcmds.c
+++ b/src/backend/commands/propgraphcmds.c
@@ -1638,7 +1638,7 @@ AlterPropGraph(ParseState *pstate, const AlterPropGraphStmt *stmt)
}
/* Remove any orphaned pg_propgraph_property entries */
- if (stmt->drop_properties || stmt->drop_vertex_tables || stmt->drop_edge_tables)
+ if (stmt->drop_label || stmt->drop_properties || stmt->drop_vertex_tables || stmt->drop_edge_tables)
{
foreach_oid(propoid, get_graph_property_ids(pgrelid))
{
```
```sql
postgres@zxm-VMware-Virtual-Platform:~/code/postgres$ psql
psql (19beta1)
Type "help" for help.
postgres=# CREATE PROPERTY GRAPH g1
VERTEX TABLES (
v1
LABEL vl1 PROPERTIES (a, b, c)
LABEL vl2 PROPERTIES (a) LABEL vl3 PROPERTIES (a,b)
);
CREATE PROPERTY GRAPH
postgres=# ALTER PROPERTY GRAPH g1 ALTER VERTEX TABLE v1 DROP LABEL vl1;
ALTER PROPERTY GRAPH
postgres=# SELECT oid, pgpname FROM pg_propgraph_property WHERE pgppgid = 'g1'::regclass ORDER BY pgpname;
oid | pgpname
--------+---------
111971 | a
111973 | b
111975 | c
(3 rows)
```
After dropping vl1, b and c are still there even though no label
references them anymore. Not sure if this is worth fixing -- thoughts?
--
regards,
Man Zeng
view thread (17+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: (SQL/PGQ) cache lookup failed for label
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox