pgstac
pgstac copied to clipboard
Ingest data by multiple users
Imagine that we have 2 users user1
and user2
which can ingest data into the database:
GRANT pgstac_ingest TO user1;
GRANT pgstac_ingest TO user2;
During the data ingestion process pgstac creates _items_N
tables and makes the current user as an owner:
postgis=# \dt;
List of relations
Schema | Name | Type | Owner
--------+----------------------+-------------------+--------------
pgstac | _items_1 | table | user1
Now if user2
try to ingest data belonging to the same collection it might end up calling ALTER TABLE
from here which will fail with must be owner of table _items_1
error.