linz / gazetteer

New Zealand Gazetteer of official place names
http://www.linz.govt.nz/regulatory/place-names/find-name/new-zealand-gazetteer-official-geographic-names/new-zealand-gazetteer-search-place-names#zoom=0&lat=-41.14127&lon=172.5&layers=BTTT
Other
2 stars 2 forks source link

No Gazetteer geometry layers created on startup #203

Closed CMKMS-LINZ closed 3 years ago

CMKMS-LINZ commented 3 years ago

Bug Description

On turning the plugin on, eight error dialogue boxes are thrown up, one for each of the four search geometries and one for each of the active feature geometries, and none of the eight layers are created in the Layer tree:

Steps to Reproduce

Turn the plugin on.

PostGIS Error log:

2020-09-02T14:00:06 WARNING Erroneous query: SELECT FROM "gazetteer"."feature_polygon" LIMIT 1 returned 7 [ERROR: permission denied for relation feature_polygon ] 2020-09-02T14:00:06 WARNING Unable to access the "gazetteer"."feature_polygon" relation. The error message from the database was: ERROR: permission denied for relation feature_polygon . SQL: SELECT FROM "gazetteer"."feature_polygon" LIMIT 1 2020-09-02T14:00:07 WARNING Erroneous query: SELECT FROM "gazetteer"."feature_line" LIMIT 1 returned 7 [ERROR: permission denied for relation feature_line ] 2020-09-02T14:00:07 WARNING Unable to access the "gazetteer"."feature_line" relation. The error message from the database was: ERROR: permission denied for relation feature_line . SQL: SELECT FROM "gazetteer"."feature_line" LIMIT 1 2020-09-02T14:00:08 WARNING Erroneous query: SELECT FROM "gazetteer"."feature_point" LIMIT 1 returned 7 [ERROR: permission denied for relation feature_point ] 2020-09-02T14:00:08 WARNING Unable to access the "gazetteer"."feature_point" relation. The error message from the database was: ERROR: permission denied for relation feature_point . SQL: SELECT FROM "gazetteer"."feature_point" LIMIT 1 2020-09-02T14:00:08 WARNING Erroneous query: SELECT FROM "gazetteer"."feature_ref_point" LIMIT 1 returned 7 [ERROR: permission denied for relation feature_ref_point ] 2020-09-02T14:00:08 WARNING Unable to access the "gazetteer"."feature_ref_point" relation. The error message from the database was: ERROR: permission denied for relation feature_ref_point . SQL: SELECT FROM "gazetteer"."feature_ref_point" LIMIT 1 2020-09-02T14:00:08 WARNING Erroneous query: SELECT FROM "gazetteer"."feature_polygon" LIMIT 1 returned 7 [ERROR: permission denied for relation feature_polygon ] 2020-09-02T14:00:08 WARNING Unable to access the "gazetteer"."feature_polygon" relation. The error message from the database was: ERROR: permission denied for relation feature_polygon . SQL: SELECT FROM "gazetteer"."feature_polygon" LIMIT 1 2020-09-02T14:00:11 WARNING Erroneous query: SELECT FROM "gazetteer"."feature_line" LIMIT 1 returned 7 [ERROR: permission denied for relation feature_line ] 2020-09-02T14:00:11 WARNING Unable to access the "gazetteer"."feature_line" relation. The error message from the database was: ERROR: permission denied for relation feature_line . SQL: SELECT FROM "gazetteer"."feature_line" LIMIT 1 2020-09-02T14:00:12 WARNING Erroneous query: SELECT FROM "gazetteer"."feature_point" LIMIT 1 returned 7 [ERROR: permission denied for relation feature_point ] 2020-09-02T14:00:12 WARNING Unable to access the "gazetteer"."feature_point" relation. The error message from the database was: ERROR: permission denied for relation feature_point . SQL: SELECT FROM "gazetteer"."feature_point" LIMIT 1 2020-09-02T14:00:12 WARNING Erroneous query: SELECT FROM "gazetteer"."feature_ref_point" LIMIT 1 returned 7 [ERROR: permission denied for relation feature_ref_point ] 2020-09-02T14:00:12 WARNING Unable to access the "gazetteer"."feature_ref_point" relation. The error message from the database was: ERROR: permission denied for relation feature_ref_point . SQL: SELECT FROM "gazetteer"."feature_ref_point" LIMIT 1

Desktop

Screenshots

image

SPlanzer commented 3 years ago

database logs point to a permissions error ERROR: permission denied for relation feature_ref_point

SPlanzer commented 3 years ago

After deploying the updated rules permissions to views may have been affected.

I have ran the below to update permissions to reflect product on views.

If this does solve the issue I will create an issue to ensure this does not affect the eventual deployment to production

ALTER TABLE gazetteer.feature_line
  OWNER TO gazetteer_dba;
GRANT SELECT ON TABLE gazetteer.feature_line TO gazetteer_user;
GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE gazetteer.feature_line TO gazetteer_admin;
REVOKE ALL ON TABLE gazetteer.feature_line FROM gazetteer_dba;

ALTER TABLE gazetteer.feature_point
  OWNER TO gazetteer_dba;
GRANT SELECT ON TABLE gazetteer.feature_point TO gazetteer_user;
GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE gazetteer.feature_point TO gazetteer_admin;
REVOKE ALL ON TABLE gazetteer.feature_point FROM gazetteer_dba;

ALTER TABLE gazetteer.feature_point
  OWNER TO gazetteer_dba;
GRANT SELECT ON TABLE gazetteer.feature_point TO gazetteer_user;
GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE gazetteer.feature_point TO gazetteer_admin;
REVOKE ALL ON TABLE gazetteer.feature_point FROM gazetteer_dba;

ALTER TABLE gazetteer.feature_ref_point
  OWNER TO gazetteer_dba;
GRANT SELECT ON TABLE gazetteer.feature_ref_point TO gazetteer_user;
GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE gazetteer.feature_ref_point TO gazetteer_admin;
REVOKE ALL ON TABLE gazetteer.feature_ref_point FROM gazetteer_dba;