docs: reference maintenance_due, recluster self-gate, and the sort_status owner fix (#415, #608) - #625
Conversation
…ort_status owner fix Three changes merged to main today shipped without their user docs. pgcolumnar.maintenance_due() (commandprompt#607): the policy report the autovacuum daemon consults. Added a sql-reference entry documenting every OUT column and the SECURITY DEFINER caller-SELECT gate, and a CHANGELOG "Added" entry. pgcolumnar.recluster self-gate (commandprompt#614): it records the clustering key it establishes and returns 0 without rewriting when the same key still covers every row group. The sql-reference recluster entry now describes the no-op, and sort_status now explains that sort_key is the recorded key with a fallback to the declared sort_by. Added a CHANGELOG "Changed" entry. pgcolumnar.sort_status owner fix (commandprompt#611, closes commandprompt#608): now SECURITY DEFINER with a caller-SELECT check, so a non-superuser table owner can read it. Added a CHANGELOG "Fixed" entry. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TgAk1gqeME7DHpJw8xxybu
3f787d4 to
c46389e
Compare
jdatcmd
left a comment
There was a problem hiding this comment.
Approved. Every claim verified against the merged code, style gate green.
Checked each statement against what actually shipped:
sort_statusfix (#611/#608): accurate. The function isSECURITY DEFINERwithrequire_caller_select(which gates onGetOuterUserId), so the CHANGELOG's "no caller gains access to a table they could not already read" is precisely right, not marketing.reclusterself-gate (#614): accurate to the three-condition gate I reviewed on that PR — recorded key matches, kind iszorder, and the sorted run still covers every row group. The "re-sorted on every call before this" framing and the daemon-dependency line both hold.sort_status.sort_keynow reports the recorded key, falling back tosort_by: matches the ripple fix in #614.
Style: no em/en-dash anywhere in the added CHANGELOG or sql-reference content (I grepped both regions specifically, since that is the CHANGELOG rule), and docs_style.sh passes 9/9 on my lane.
Non-blocking note — a wider doc gap, for a follow-up, not this PR. While confirming scope I found three other user-facing things merged and undocumented in sql-reference.md: pgcolumnar.maintenance_due() (#607 — and it is the policy function the #624 daemon consumes, so it is the most conspicuous omission), parquet_schema's new field_id column (#613), and object-storage read/write paths (s3:// in export_parquet/read_parquet, #393/#622). None belong in this PR, which does exactly what it scopes accurately. But they are the same class of "merged without docs" this PR is backfilling, so worth a tracking issue rather than discovering them the same way. Happy to take that backfill if you'd rather not fold it in.
Merge when ready.
…g changes Backfills the documentation for the work that merged today, audited against the SQL surface on main. sql-reference.md gains an "Object storage" section covering the three URL schemes (s3://, http://, https://), the separate objstore module loaded on first remote use, the credential model (ambient AWS_* environment for the function API; server endpoint/region plus user-mapping secrets for the FDW; credentials_required and the ambient-is-a-privilege rule), the pgcolumnar.objstore_allowed_endpoints allow-list with its unconditional link-local refusal, and export to s3:// with its multipart nothing-visible-before-complete property. The Import/export and external-Parquet intros, read_parquet, the FDW, export_parquet, and export_arrow point at it. parquet_schema's signature gains the field_id column (commandprompt#388) and describes it (NULL vs 0). configuration.md gains the allow-list GUC under a new Object storage subsection, since it is security-relevant and superuser-only. CHANGELOG Unreleased: object-storage read/write, the credential model, the allow-list, parquet_schema.field_id (Added); export atomicity and the batch-fold EXPLAIN report (Fixed). Docs only. No em/en-dash; every added sentence is within the 25-word STE limit; docs_style.sh passes 9/9. The pgcolumnar_autovacuum daemon (commandprompt#624) is documented with its own PR and is not covered here; recluster and sort_status were documented by commandprompt#625. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Three changes merged to
maintoday shipped without their user-facing docs. This backfills all three. Docs only, no code.pgcolumnar.maintenance_due()(#607, part of #415)The policy report the autovacuum daemon consults each sweep, also callable from a monitoring query. It had no sql-reference entry. Added one documenting every OUT column (
deleted_fraction,appended_fraction,compact_rewrite_due,recluster_due,recommendation, ...) and theSECURITY DEFINERcaller-SELECTgate.CHANGELOGgets an Added entry.pgcolumnar.reclusterself-gate (#614, part of #415)reclusternow records the clustering key it establishes and returns0without rewriting when the same key still covers every row group. That is the property the daemon (#624) depends on. The sql-referencereclusterentry now describes the no-op, and thesort_statustable now explains thatsort_keyis the recorded key, falling back to the declaredsort_by.CHANGELOGgets a Changed entry.pgcolumnar.sort_statusowner fix (#611, closes #608)sort_statusreads pgColumnar's internal catalogs, which carry noGRANT, so as an invoker-rights function it false-denied every non-superuser — including the table's own owner. It is nowSECURITY DEFINERwith a caller-SELECTcheck.CHANGELOGgets a Fixed entry.Scope
Docs only.
test/docs_style.shpasses (STE rules ondocs/+README.md; no em/en-dash inCHANGELOG.md).🤖 Generated with Claude Code