stac-utils / pgstac

Schema, functions and a python library for storing and accessing STAC collections and items in PostgreSQL
MIT License
153 stars 39 forks source link

Allow read-only replicas work even when the context extension is enabled #298

Closed drnextgis closed 2 months ago

drnextgis commented 3 months ago

It fixes the following issue:

postgis=> SELECT search('{}');
NOTICE:  SEARCH: {}
NOTICE:  FILTER: <NULL>
ERROR:  cannot execute SELECT FOR UPDATE in a read-only transaction
CONTEXT:  SQL statement "SELECT *         FROM search_wheres WHERE md5(_where)=inwhere_hash FOR UPDATE"
PL/pgSQL function where_stats(text,boolean,jsonb) line 57 at SQL statement
PL/pgSQL function search(jsonb) line 65 at assignment

I proposed the test in another PR: https://github.com/stac-utils/pgstac/pull/297

drnextgis commented 2 months ago

@bitner I wanted to kindly ask if you could take a moment to review the PR :pray:

drnextgis commented 2 months ago

@bitner are there any plans to cut a new release soon?

mindflayer commented 2 months ago

Hi there, I am sorry for stepping in, but we helped with spotting the issue and fixing it, and just knowing when this will be available would really help my team in Satellogic to plan the next steps. Thanks!