pgsql: Cleanup users and roles in graph_table_rls test

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Cleanup users and roles in graph_table_rls test
Date: 2026-03-20 10:08:46
Message-ID: E1w3Wmb-000csa-1o@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Cleanup users and roles in graph_table_rls test

This test leaves behind the roles and users it creates.
002_pg_upgrade test dumps and restore the regression when
PG_TEST_EXTRA contains regress_dump_restore. The global objects such
as users and roles are not dumped by pg_dump. But it still dumps the
policies associated with users, and commands to set the ownership.
Restoring these policies and the ownerships fails since the users and
roles do not exist. To fix this failure we could use --no-owner, but
it does not exclude the policy objects associated with users. Hence
drop the users, roles and policies that depend upon them at the end of
the test.

Author: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Reported-by: Peter Eisentraut <peter(at)eisentraut(dot)org>
Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Discussion: https://www.postgresql.org/message-id/flat/a855795d-e697-4fa5-8698-d20122126567(at)eisentraut(dot)org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/040a56be4bcc88cad98f092970a8c6521263bba1

Modified Files
--------------
src/test/regress/expected/graph_table_rls.out | 17 ++++++++++++++++-
src/test/regress/sql/graph_table_rls.sql | 17 ++++++++++++++++-
2 files changed, 32 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2026-03-20 12:41:00 pgsql: json format for COPY TO
Previous Message Peter Eisentraut 2026-03-20 07:48:58 pgsql: Update Unicode data to Unicode 17.0.0