pgsql: Cleanup users and roles in graph_table_rls test

Started by Peter Eisentraut4 months ago1 messagescomitters
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

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.bapat.oss@gmail.com>
Reported-by: Peter Eisentraut <peter@eisentraut.org>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: /messages/by-id/a855795d-e697-4fa5-8698-d20122126567@eisentraut.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(-)