pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix two portability issues with the tests of test_oat_hooks
Date: Mon, 11 Jul 2022 03:48:24 +0000
Message-ID: <E1oAkPG-002DJj-SJ@gemulon.postgresql.org> (raw)

Fix two portability issues with the tests of test_oat_hooks

This addresses two issues in the tests of test_oat_hooks:
- The role regress_test_user was being left behind, preventing the test
to succeed on repeated runs.  It makes sense to leave some objects
behind to have more coverage for pg_upgrade (as does test_pg_dump), but
the role dropped here does not own any objects so there is no reason to
keep it.
- GRANT SET ON PARAMETER is issued, creating an entry in
pg_parameter_acl without cleaning up the entry created.  This causes
an overlap with unsafe_tests as both use work_mem, making the latter
fail.  This commit adds an extra REVOKE SET ON PARAMETER to clean the
contents of pg_parameter_acl, switching to maintenance_work_mem rather
than work_mem to avoid an overlap between both tests.

The tests of test_oat_hooks cannot use installcheck yet as these are
proving to be unstable with caching and the namespace search hooks, so
the issues fixed here cannot be reached yet, but they would be once the
hook issue is addressed and installcheck is allowed again in
test_oat_hooks.

Discussion: https://postgr.es/m/YrpVkADAY0knF6vM@paquier.xyz
Backpatch-through: 15

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/03b87d08a4163d23d4acd83e3c022ab82b43a7ac

Modified Files
--------------
src/test/modules/test_oat_hooks/expected/test_oat_hooks.out | 8 ++++++--
src/test/modules/test_oat_hooks/sql/test_oat_hooks.sql      | 6 ++++--
2 files changed, 10 insertions(+), 4 deletions(-)



view thread (2+ messages)

Message-ID: <E1oAkPG-002DJj-SJ@gemulon.postgresql.org>
Permalink:  ../E1oAkPG-002DJj-SJ@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1oAkPG-002DJj-SJ@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Fix two portability issues with the tests of test_oat_hooks
  In-Reply-To: <E1oAkPG-002DJj-SJ@gemulon.postgresql.org>
  References: <E1oAkPG-002DJj-SJ@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox