From 513de6033c0d77cb156d2c0c2e454cff60fb5a0b Mon Sep 17 00:00:00 2001 From: Zac Deziel Date: Mon, 22 Apr 2024 07:08:10 -0700 Subject: [PATCH] Add information on automated collection extents trigger (#259) * Add information on automated collection extents trigger * Remove duplicate mention of unreleased section --- CHANGELOG.md | 5 ++++- docs/src/pypgstac.md | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9c4bb0c..97bda038 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## Unreleased + +### UNRELEASED + +- Updated docs on automated updates of collection extents. (CLOSES #247) ### Fixed - Fix issue when installing or migrating pgstac using a non superuser (particularly when using the default role found on RDS). (FIXES #239). Backports fix into migrations for 0.8.2, 0.8.3, and 0.8.4. diff --git a/docs/src/pypgstac.md b/docs/src/pypgstac.md index ad14c4f1..9e62eb33 100644 --- a/docs/src/pypgstac.md +++ b/docs/src/pypgstac.md @@ -84,3 +84,9 @@ To upsert any records, adding anything new and replacing anything with the same ``` pypgstac load items --method upsert ``` + +### Automated Collection Extent Updates + +By setting `pgstac.update_collection_extent` to `true`, a trigger is enabled to automatically adjust the spatial and temporal extents in collections when new items are ingested. This feature, while helpful, may increase overhead within data load transactions. To alleviate performance impact, combining this setting with `pgstac.use_queue` is beneficial. This approach necessitates a separate process, such as a scheduled task via the `pg_cron` extension, to periodically invoke `CALL run_queued_queries();`. Such asynchronous processing ensures efficient transactional performance and updated collection extents. + +*Note: The `pg_cron` extension must be properly installed and configured to manage the scheduling of the `run_queued_queries()` function.*