Repository navigation
WIP: Add Performing Daily Operations with ColdFront #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| # Performing Daily Operations with ColdFront | ||
|
|
||
| This guide walks through the full lifecycle of a ColdFront deployment, | ||
| from getting a cluster running to the ongoing maintenance a live | ||
| deployment needs. | ||
|
|
||
| ## Getting ColdFront Running | ||
|
|
||
| This is covered in detail in | ||
| [Installing and Configuring ColdFront](installation.md): | ||
|
|
||
| - Install via package (`pgedge-coldfront` and its dependencies) or build | ||
| from source/Docker. | ||
| - Configure `postgresql.conf` (`shared_preload_libraries`, the `duckdb.*` | ||
| extension-loading settings, `coldfront.warehouse`/`lakekeeper_endpoint`). | ||
| - Stand up Lakekeeper, bootstrap it, create a warehouse pointing at your | ||
| object store, pre-create the namespace. | ||
| - `CREATE EXTENSION pg_duckdb; CREATE EXTENSION coldfront;`, then | ||
| `coldfront.set_storage_secret(...)` once. | ||
|
|
||
| ## Using ColdFront Day to Day | ||
|
|
||
| Each table is assigned one mode at creation time: | ||
|
|
||
| - **Tiered**: an ordinary partitioned Postgres table. Recent partitions | ||
| stay hot in Postgres; the archiver (run from cron) ages old | ||
| partitions out to Iceberg once they pass `hot_period`. Reads | ||
| transparently union hot and cold data. | ||
| - **Decoupled**: `coldfront.create_iceberg_table(...)` - the whole | ||
| table lives in Iceberg from row one, with no archiver involved. | ||
| - **Standalone partitioner**: no cold tier at all. The partitioner | ||
| alone manages Postgres range partitions - premaking forward | ||
| partitions and dropping or detaching expired ones - with no Iceberg | ||
| or DuckDB involved. | ||
|
|
||
| Regardless of mode, normal `SELECT`, `INSERT`, `UPDATE`, and `DELETE` | ||
| statements work against the relation; a write that touches cold data | ||
| just can't use `RETURNING`. | ||
|
|
||
| ## Scheduling the Background Jobs | ||
|
|
||
| ColdFront relies on three background jobs, all run from cron: | ||
|
|
||
| - **archiver** - tiers old partitions to cold storage (tiered mode only). | ||
| - **partitioner** - premakes upcoming partitions, retires expired ones | ||
| (every mode that uses partitioning). | ||
| - **compactor** - cold-tier housekeeping: compaction, snapshot expiry, | ||
| orphan-Parquet-file removal. | ||
|
|
||
| ## Keeping the Deployment Healthy | ||
|
|
||
| A few things need periodic attention once a deployment is running: | ||
|
|
||
| - `coldfront.grant_app_access('role')` has to be re-run after creating, | ||
| adopting, or tiering a table, since `grant_app_access` derives its | ||
| grants from the registry at the moment it runs. | ||
| - Lakekeeper's `LAKEKEEPER__PG_ENCRYPTION_KEY` must stay stable and backed | ||
| up - losing it makes every stored credential unrecoverable. | ||
| - In a distributed (Spock mesh) deployment, the bakery protocol serializes | ||
| concurrent cold writes across nodes using replicated tickets | ||
| (`coldfront.claims`/`claim_acks`); at steady state that ledger should be | ||
| empty, and half of `wal_sender_timeout` must stay below | ||
| `coldfront.peer_alive_window_ms`, or a claim refuses to run. | ||
| - For compliance environments, `coldfront.set_storage_secret_vended()` | ||
| avoids storing a credential at all - Lakekeeper vends short-lived STS | ||
| credentials per table instead. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't find this paragraph relevant at all in this spot, and the mention of RETURNING is confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What you see here is just an early draft - I told Claude to (based on your content) provide an outline/reference for the steps that a user will need to perform on a day to day basis to use ColdFront. Your usage guide is action packed, but too hard to wade through on a daily basis - we might want to break the sections apart even, into other pages for ease of use and maintenance.