Re: SQL Property Graph Queries (SQL/PGQ)

From: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Kirill Reshke <reshkekirill(at)gmail(dot)com>, assam258(at)gmail(dot)com, Amit Langote <amitlangote09(at)gmail(dot)com>, Junwang Zhao <zhjwpku(at)gmail(dot)com>, Vik Fearing <vik(at)postgresfriends(dot)org>, Ajay Pal <ajay(dot)pal(dot)k(at)gmail(dot)com>, Imran Zaheer <imran(dot)zhir(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SQL Property Graph Queries (SQL/PGQ)
Date: 2026-03-18 15:32:35
Message-ID: CAExHW5sitKZSSKZVj2kAB8qtdtg4v-R4fgOgsu44tONsMosL9Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 18, 2026 at 12:59 PM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>
> On 17.03.26 14:57, Peter Eisentraut wrote:
> > On 16.03.26 16:54, Ashutosh Bapat wrote:
> >> The patch looks fine to me. While reviewing it, I noticed that the
> >> function has an extra loop to count the number of variables. I don't
> >> think it's needed. The count can be obtained from the list length. In
> >> the attached patch, I have removed that loop. Am I missing something?
> >>
> >> 0001 is your patch
> >> 0002 removes the loop + some cosmetic changes
> >
> > committed
>
> There are still some pg_upgrade-related failures on the buildfarm, but
> AFAICT these are not specifically from this feature but more from the
> test design of the PG_TEST_EXTRA="regress_dump_restore" test. It looks
> like we need to drop all users at the end of
> src/test/regress/sql/graph_table_rls.sql to make this work.
>

PFA the patch. I tried using --no-owner with pg_restore and pg_dump
but that doesn't work since it doesn't exclude policies. I had to add
"reassign owner to" so that we could retain as many objects as
possible. Also had to drop the policies which are applicable to users
being dropped. Reassign doesn't work on policies, ofc.

I remember thinking about using pg_dumpall instead of pg_dump in
002_pg_upgrade, but IIRC, we faced some issues doing so. Didn't try
that this time. If that works, we may not need to drop users. But I am
not sure if the test coverage we will get for dump/restore is worth
it.

--
Best Wishes,
Ashutosh Bapat

Attachment Content-Type Size
v20260318-0001-Cleanup-users-and-roles-in-graph_table_rls.patch text/x-patch 3.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Junwang Zhao 2026-03-18 15:34:30 Re: Eliminating SPI / SQL from some RI triggers - take 3
Previous Message Sami Imseih 2026-03-18 15:20:56 Re: dshash_find_or_insert vs. OOM