Skip to content

Commit 3685609

Browse files
authored
Fix migrations, Add perf logging, id search limit shortcut (#181)
* fix migrations, add perf logging, id search limit shortcut
1 parent 7f9c750 commit 3685609

12 files changed

+4579
-30
lines changed

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## [v0.7.7]
8+
9+
### Fixed
10+
- Fix migrations for 0.7.4->0.7.5 and 0.7.5->0.7.6 to use the partition_view rather than the materialized view to avoid issue with refreshing the materialized view when run in the same statement that is accessing the view. Fixes #180.
11+
12+
### Added
13+
- Add a short cirucit for id searches that sets the limit to be no more than the number of ids in the filter.
14+
- Add 'timing' configuration variable that adds a "timing" element to the return object with the amount of time that it took to return a search.
15+
- Reduce locking when updating statistics in the search table. Use skip locked to skip updating last_used and count when there is a lock being held.
16+
17+
718
## [v0.7.6]
819

920
### Fixed

src/pgstac/migrations/pgstac.0.7.4-0.7.5.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -1033,5 +1033,5 @@ GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA pgstac to pgstac_ingest;
10331033
GRANT ALL ON ALL TABLES IN SCHEMA pgstac to pgstac_ingest;
10341034
GRANT USAGE ON ALL SEQUENCES IN SCHEMA pgstac to pgstac_ingest;
10351035

1036-
SELECT update_partition_stats_q(partition) FROM partitions;
1036+
SELECT update_partition_stats_q(partition) FROM partitions_view;
10371037
SELECT set_version('0.7.5');

src/pgstac/migrations/pgstac.0.7.5-0.7.6.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -298,5 +298,5 @@ GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA pgstac to pgstac_ingest;
298298
GRANT ALL ON ALL TABLES IN SCHEMA pgstac to pgstac_ingest;
299299
GRANT USAGE ON ALL SEQUENCES IN SCHEMA pgstac to pgstac_ingest;
300300

301-
SELECT update_partition_stats_q(partition) FROM partitions;
301+
SELECT update_partition_stats_q(partition) FROM partitions_view;
302302
SELECT set_version('0.7.6');

src/pgstac/migrations/pgstac.0.7.5.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -4014,5 +4014,5 @@ GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA pgstac to pgstac_ingest;
40144014
GRANT ALL ON ALL TABLES IN SCHEMA pgstac to pgstac_ingest;
40154015
GRANT USAGE ON ALL SEQUENCES IN SCHEMA pgstac to pgstac_ingest;
40164016

4017-
SELECT update_partition_stats_q(partition) FROM partitions;
4017+
SELECT update_partition_stats_q(partition) FROM partitions_view;
40184018
SELECT set_version('0.7.5');

0 commit comments

Comments
 (0)