| From: | Andres Freund <andres(at)anarazel(dot)de> |
|---|---|
| To: | Melanie Plageman <melanieplageman(at)gmail(dot)com> |
| Cc: | Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-hackers(at)postgresql(dot)org, rmt(at)lists(dot)postgresql(dot)org |
| Subject: | Re: PGQ catalog representation and pg_dump support |
| Date: | 2026-09-02 22:14:15 |
| Message-ID: | 455kiyeminwhypznmxazg5mz6lrn3ryryie5s2ub3t4dkey6zg@gfujp5sivvyo |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On 2026-09-02 17:33:38 -0400, Andres Freund wrote:
> - As mentioned in my last email, nothing protects the graph object against
> being altered while rewriteGraphTable() is running, due to AlterPropGraph()
> only holding an AccessShareLock. That's bad.
An particularly odd thing about that is that some things in
rewriteGraphTable.c actually use a more heavyweight lock level -
is_property_associated_with_label() and get_element_property_expr() use
RowShareLock. I don't really understand why? There's no comment about that
either?
There are also unexplained uses of RowShareLock in propgraphcmds.c - why is
e.g. pg_attribute opened with RowShareLock?
Separately (noticed when searching for RowShareLock uses): Isn't it somewhat
of a problem to do a seqscan of PropgraphLabelPropertyRelationId for
/* Remove any orphaned pg_propgraph_property entries */
I don't know why that code uses RowShareLock either. Not using AccessShareLock
makes sense, afaict the performDeletion() of PropgraphPropertyRelationId done
during the scan will recurse to PropgraphLabelPropertyRelationId - avoiding
deadlock hazards due to lock upgrades could make sense. But a deletion takes
RowExclusive, not RowShare? So what's the point of RowShare?
Greetings,
Andres Freund
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Rowley | 2026-09-02 22:48:44 | Re: glist: _Generic wrapper for selective dlist/dclist usage |
| Previous Message | Andres Freund | 2026-09-02 21:33:38 | Re: PGQ catalog representation and pg_dump support |