mirror of
https://github.com/github/awesome-copilot.git
synced 2026-07-14 01:51:02 +00:00
0b950f9824
- Update migration agent guidelines to prioritize extension tool usage for code migration. - Refine migration phases with detailed steps for pre-migration review and schema migration. - Add new reviewing skill references for PostgreSQL materialized view refresh and UNION ALL planner risks. - Ensure consistency in collation handling and testing strategies across skills. Co-authored-by: TCPrimedPaul <paul.delannoy@tc.gc.ca>
1.4 KiB
1.4 KiB
PostgreSQL Materialized View Refresh Guide
Purpose: Ensure migrated applications keep materialized views current after base-table changes.
Problem
PostgreSQL materialized views are static snapshots. Updates to source tables do not automatically refresh dependent materialized views.
Migration risk
- Oracle-era assumptions that derived data updates immediately may no longer hold.
- Read paths can return stale rows unless refresh timing is explicitly managed.
- Integration tests may pass once and then fail intermittently if refresh sequencing is not deterministic.
Required review item
For every migrated path that writes to tables feeding a materialized view, verify the application workflow includes an explicit refresh strategy.
Refresh patterns
- Immediate refresh in the write workflow when freshness is required:
REFRESH MATERIALIZED VIEW my_view; - Concurrent refresh (when supported and indexed) to reduce read blocking:
REFRESH MATERIALIZED VIEW CONCURRENTLY my_view; - Scheduled/batch refresh when stale windows are acceptable.
Integration-test expectations
- Tests that modify source tables assert materialized-view contents only after the intended refresh action.
- Tests assert stale behavior before refresh when applicable.
- Tests document whether freshness is immediate or eventual for each affected feature.