Opened 21 months ago

Closed 6 months ago

#5212 closed defect (wontfix)

Can't regress test PostGIS using non-superuser PostgreSQL role (cannot set lc_messages)

Reported by: robe Owned by: robe
Priority: medium Milestone: PostGIS 3.5.0
Component: QA/testsuite Version: 3.0.x
Keywords: pgextwlist Cc:

Description

I was using pgtwlist to try to simulate a sandboxed user such as one would find in a classroom or in a cloud setup.

Basic steps in my setup, I install the https://github.com/dimitri/pgextwlist.git extension, restart the postgresql service

ALTER SYSTEM SET extwlist.extensions='postgis,postgis_topology,postgis_sfcgal, address_standardizer,postgis_tiger_geocoder'; 
SELECT pg_reload_conf();

The user I created, has rights to create databases but is not a super user, and I confirmed I can do CREATE EXTENSION postgis with this user.

When I try to regress though, I get an error

> "/var/run/postgresql/.s.PGSQL.5433" failed: FATAL:  permission denied 
> to set parameter "lc_messages"

Change History (11)

comment:1 by robe, 21 months ago

Milestone: PostGIS 3.2.3PostGIS 3.4.0

comment:2 by robe, 10 months ago

Milestone: PostGIS 3.4.0PostGIS 3.5.0

comment:3 by robe, 8 months ago

Owner: changed from strk to robe

comment:4 by strk, 7 months ago

Keywords: pgextwlist added

comment:5 by strk, 7 months ago

CI coverage of sandboxed systems ticket filed: #5566

comment:7 by strk, 7 months ago

Summary: Can't regress test PostGIS against sandboxed systemsCan't regress test PostGIS against sandboxed systems (lc_messages)

The lc_messages setting was added in 2006 to force C locale with [81943a774a0bc2d046592736b3c9e5a35fffe29e/git] — we'd need a way to request C locale that doesn't require superuser permission. It's currently done by run_test.pl

comment:8 by strk, 7 months ago

Summary: Can't regress test PostGIS against sandboxed systems (lc_messages)Can't regress test PostGIS using non-superuser PostgreSQL role (cannot set lc_messages)
Version: 3.2.x3.0.x

comment:9 by Sandro Santilli <strk@…>, 6 months ago

In 5739cacd/git:

run_test.pl: add POSTGIS_REGRESS_DB_OWNER env support

Allows specifying a DB role to be given ownership of the regress
database and be used to create extension of POSTGIS_REGRESS_EXT_CREATOR
is not also provided to override that.

References #5212
References #5566
References #5567

comment:10 by strk, 6 months ago

Component: buildQA/testsuite

comment:11 by strk, 6 months ago

Resolution: wontfix
Status: newclosed

I think we can close this as won't-fix as in order to load postgis function you'll need superuser anyway. Surely for script based and also for extension based unless we turn the extension into a trusted one ( ref #5567 ).

Sandboxed based testing is now supported and used by Woodie.

Regina: feel free to reopen if you disagree

Note: See TracTickets for help on using tickets.