Skip to content

Commit

Permalink
Fix migrations, Add perf logging, id search limit shortcut (#181)
Browse files Browse the repository at this point in the history
* fix migrations, add perf logging, id search limit shortcut
  • Loading branch information
bitner authored May 24, 2023
1 parent 7f9c750 commit 3685609
Show file tree
Hide file tree
Showing 12 changed files with 4,579 additions and 30 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ 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/).

## [v0.7.7]

### Fixed
- 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.

### Added
- Add a short cirucit for id searches that sets the limit to be no more than the number of ids in the filter.
- 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.
- 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.


## [v0.7.6]

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion src/pgstac/migrations/pgstac.0.7.4-0.7.5.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1033,5 +1033,5 @@ GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA pgstac to pgstac_ingest;
GRANT ALL ON ALL TABLES IN SCHEMA pgstac to pgstac_ingest;
GRANT USAGE ON ALL SEQUENCES IN SCHEMA pgstac to pgstac_ingest;

SELECT update_partition_stats_q(partition) FROM partitions;
SELECT update_partition_stats_q(partition) FROM partitions_view;
SELECT set_version('0.7.5');
2 changes: 1 addition & 1 deletion src/pgstac/migrations/pgstac.0.7.5-0.7.6.sql
Original file line number Diff line number Diff line change
Expand Up @@ -298,5 +298,5 @@ GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA pgstac to pgstac_ingest;
GRANT ALL ON ALL TABLES IN SCHEMA pgstac to pgstac_ingest;
GRANT USAGE ON ALL SEQUENCES IN SCHEMA pgstac to pgstac_ingest;

SELECT update_partition_stats_q(partition) FROM partitions;
SELECT update_partition_stats_q(partition) FROM partitions_view;
SELECT set_version('0.7.6');
2 changes: 1 addition & 1 deletion src/pgstac/migrations/pgstac.0.7.5.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4014,5 +4014,5 @@ GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA pgstac to pgstac_ingest;
GRANT ALL ON ALL TABLES IN SCHEMA pgstac to pgstac_ingest;
GRANT USAGE ON ALL SEQUENCES IN SCHEMA pgstac to pgstac_ingest;

SELECT update_partition_stats_q(partition) FROM partitions;
SELECT update_partition_stats_q(partition) FROM partitions_view;
SELECT set_version('0.7.5');
Loading

0 comments on commit 3685609

Please sign in to comment.