Repository navigation
WIP - docs: reorganize ColdFront docs into the standard pgedge nav structure - #114
susan-pgedge wants to merge 4 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
Up to standards ✅🟢 Issues
|
Splits usage.md's three operating modes into their own guides, moves shared operational topics into a new Administration nav section, and converts the Using ColdFront and Architecture Guides sections to real index.md pages so their nav headers open directly without a duplicate child link.
a8b3021 to
f724af6
Compare
…d index.md Moves the Least-Privilege Application Roles content into a new Connecting to ColdFront guide, renames and restructures the Getting Started walkthrough into Exploring ColdFront - Getting Started, folds the Caveats pointer into a new Resources/Exploring ColdFront with Walkthroughs section on the landing page, and polishes wording across installation.md, configuration.md, and one_time_setup.md.
- Rename the distributed setup page to Configuring a Distributed Deployment and move it under Configuring ColdFront. - Fold reading_writing.md into other pages and remove it. - Rework supported_types.md and rename it Supported Column Types. - Move the build step into the compaction intro and drop the Usage, Requirements, and Next Steps headings. - Bring the README table of contents and documentation table in line with the nav.
vyruss
left a comment
There was a problem hiding this comment.
Wow, that's a lot of work! I think it looks good.
| Other data types (unbounded `numeric`, `xml`, `tsvector`, range/multirange types, | ||
| custom enums, composite types, pgvector's `sparsevec`, `inet`, `cidr`, `oid`, | ||
| and the arrays that [Supported Array Types](#supported-array-types) lists | ||
| as refused at registration) is |
There was a problem hiding this comment.
I read this as "Other data types (...) are rejected"
| - a `--sub-values-source` without a `--column`. | ||
| - a table with neither a `--hot-period` nor a `--retention`. | ||
|
|
||
| - any relation in the partition tree is `UNLOGGED`, because that data is |
There was a problem hiding this comment.
Registration also refuses a column that is not the partition key:
| - any relation in the partition tree is `UNLOGGED`, because that data is | |
| - `--column`, or `partition_column` on `import`, names a column that is not the | |
| table's partition key. On a two-level table, registration refuses only a | |
| column that the table lacks. The refusal names the flag or key and, for a | |
| flat table, the table's partition key. | |
| - any relation in the partition tree is `UNLOGGED`, because that data is |
| value in a `date`, `timestamp with time zone` or `timestamp without time | ||
| zone` column, as array elements too. ColdFront refuses those values with | ||
| a check constraint named `coldfront_guard_<column>`; a write that goes to | ||
| the cold tier, in either mode, is refused by DuckDB. |
There was a problem hiding this comment.
The exception for a numeric NaN read from a PostgreSQL table:
| the cold tier, in either mode, is refused by DuckDB. | |
| the cold tier, in either mode, is refused by DuckDB, unless the write reads a | |
| `numeric` `NaN` from a PostgreSQL table and stores it as `0`. |
| 1, such as `'[0:2]={1,2,3}'`. The hot table's check constraint refuses such an | ||
| array when it is written. A write to the cold tier refuses it too: a tiered | ||
| `INSERT` with an error that names the column, and a bound parameter with an | ||
| error that names no column. A tiered table with a column declared with more |
There was a problem hiding this comment.
An array read from a PostgreSQL table is stored renumbered, not refused:
| error that names no column. A tiered table with a column declared with more | |
| error that names no column. A write that reads the array from a PostgreSQL | |
| table stores it renumbered from 1 instead. A tiered table with a column | |
| declared with more |
| - **Azure ADLS Gen2** needs a storage account, a filesystem (container) | ||
| in that account, and the account's access key. |
There was a problem hiding this comment.
The storage account needs hierarchical namespace:
| - **Azure ADLS Gen2** needs a storage account, a filesystem (container) | |
| in that account, and the account's access key. | |
| - **Azure ADLS Gen2** needs a storage account with hierarchical namespace | |
| enabled (for example, `az storage account create --hns true`), a filesystem | |
| (container) in that account, and the account's access key. A StorageV2 | |
| account without hierarchical namespace is not an ADLS Gen2 account, and | |
| Lakekeeper's `adls` warehouse fails on it. |
There was a problem hiding this comment.
Lines 75-80 become:
attaches as `pglocal`. A write that reads a PostgreSQL table uses it: an
`INSERT ... SELECT`, an `UPDATE ... FROM`, a `DELETE ... USING`, or a `MERGE`
whose source is a PostgreSQL table. The GUC is `PGC_SUSET` and superuser-only,
because the DSN can hold credentials. `set_storage_secret` installs the
`postgres` extension when the GUC is set, and `coldfront.ensure_pg_attached()`
attaches `pglocal` when such a write runs. With the GUC unset, that write
fails, because DuckDB has no `pglocal` catalog to resolve. The extension reads
a `numeric` `NaN` as `0` and renumbers an array to start at 1, so such a write
can store a changed value, as [Supported Column Types](supported_types.md)
describes.| A cold `UPDATE ... FROM`, a `MERGE` whose source is a PostgreSQL table, and an | ||
| `INSERT ... SELECT` into a decoupled table read that PostgreSQL table through | ||
| DuckDB's postgres extension, which reads a `numeric` `NaN` as `0` and drops an | ||
| array's lower bound. ColdFront cannot refuse those values on that path, so | ||
| filter them out of such a source. |
There was a problem hiding this comment.
The writes that read a PostgreSQL table this way, and what they do with the changed values:
| A cold `UPDATE ... FROM`, a `MERGE` whose source is a PostgreSQL table, and an | |
| `INSERT ... SELECT` into a decoupled table read that PostgreSQL table through | |
| DuckDB's postgres extension, which reads a `numeric` `NaN` as `0` and drops an | |
| array's lower bound. ColdFront cannot refuse those values on that path, so | |
| filter them out of such a source. | |
| A cold `UPDATE ... FROM` or `DELETE ... USING`, a `MERGE` whose source is a | |
| PostgreSQL table, and an `INSERT ... SELECT` into a decoupled table read that | |
| PostgreSQL table through DuckDB's postgres extension, which reads a `numeric` | |
| `NaN` as `0`, also inside an array, and drops an array's lower bound. ColdFront | |
| cannot refuse those values on that path: the write stores the changed values | |
| with no error, and its conditions compare the changed values. A condition that | |
| names `'NaN'` fails in such a write, because DuckDB does not accept `'NaN'` as | |
| a `numeric` value. To keep those values out of the cold tier, check the source | |
| table in PostgreSQL before the write, and fix or remove the rows that hold | |
| them. |
| DuckDB's postgres extension, which reads a `numeric` `NaN` as `0` and drops an | ||
| array's lower bound. ColdFront cannot refuse those values on that path, so | ||
| filter them out of such a source. | ||
|
|
There was a problem hiding this comment.
A query that finds those rows in a source table:
| The following query counts those rows in a source table `staging` with a | |
| `numeric` column `amount`, a `numeric` array `amounts` and an array `tags`: | |
| ```sql | |
| SELECT count(*) | |
| FROM staging | |
| WHERE amount = 'NaN' | |
| OR 'NaN' = ANY (amounts) | |
| OR array_lower(tags, 1) <> 1; | |
| ``` | |
| List every `numeric` column, `numeric` array and array column of your source | |
| table the same way; a count of `0` means that the write stores those columns | |
| unchanged. | |
| and change feed (blob events) to be OFF on the storage account. Lakekeeper | ||
| warehouse creation otherwise fails with HTTP 409 ("This endpoint does not | ||
| support BlobStorageEvents or SoftDelete"). Disable those features on the | ||
| storage account before using it as a cold tier. |
There was a problem hiding this comment.
The caveat for a cold-tier write that reads a PostgreSQL table:
| storage account before using it as a cold tier. | |
| storage account before using it as a cold tier. | |
| - A cold-tier write that reads an ordinary PostgreSQL table, such as an | |
| `UPDATE ... FROM` or a `MERGE` from one, stores a `numeric` `NaN` from that | |
| table as `0` and stores an array renumbered to start at 1, with no error. | |
| [Supported Column Types](supported_types.md) lists the writes that do this | |
| and shows how to check a source table first. |
Summary
Test plan
mkdocs build --strictpasses with no warningsmkdocs serve): Using ColdFront, Architecture Guides, and Administration all render and link correctly