Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STAC Server responding with SQL Create Error when using /collections/<id>/items with dedicated STAC Reader #191

Closed
ChristineSeeliger opened this issue Jun 26, 2023 · 3 comments · Fixed by #215

Comments

@ChristineSeeliger
Copy link

ChristineSeeliger commented Jun 26, 2023

In our setup with a dedicated AWS Aurora READ replica as Reader, the STAC server responds with this error message when querying the collections/_collection_id/items endpoints.
{
"code": "ReadOnlySQLTransactionError",
"description": "cannot execute CREATE TABLE in a read-only transaction"
}

The issues obviously disappears when setting the reader to the read/write instance however, I assume having a writeable instance as READER wouldn't be the intention.

@bitner
Copy link
Collaborator

bitner commented Jun 29, 2023

Right now, using search on pgstac is not a read only operation. It uses two tables searches and search_wheres that allow for the use of a hash for queries (leveraged by titiler-pgstac), cache expensive calls for context counts and maintain statistics about how many times queries have been used.

@bkanuka
Copy link

bkanuka commented Jul 12, 2023

Is there a bug or discussion about making search (optionally) a read-only operation? I would be interested in this.

@bitner
Copy link
Collaborator

bitner commented Sep 25, 2023

@ChristineSeeliger @bkanuka I've begun work on adding an option to allow use on read only instances in #215.

You should note that this mode will not allow you to register queries with their hash as used in TiTiler-PGStac.
It also prevents the use of a cache for context results (total number of results) - in particular, if you have the "context" setting turned on, queries (particularly when paging) may be very slow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants