Skip to content

docs: reference maintenance_due, recluster self-gate, and the sort_status owner fix (#415, #608) - #625

Merged
jdatcmd merged 1 commit into
commandprompt:mainfrom
ChronicallyJD:docs/415-recluster-sortstatus
Aug 14, 2026
Merged

docs: reference maintenance_due, recluster self-gate, and the sort_status owner fix (#415, #608)#625
jdatcmd merged 1 commit into
commandprompt:mainfrom
ChronicallyJD:docs/415-recluster-sortstatus

Conversation

@ChronicallyJD

@ChronicallyJD ChronicallyJD commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Three changes merged to main today 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 the SECURITY DEFINER caller-SELECT gate. CHANGELOG gets an Added entry.

pgcolumnar.recluster self-gate (#614, part of #415)

recluster now records the clustering key it establishes and returns 0 without rewriting when the same key still covers every row group. That is the property the daemon (#624) depends on. The sql-reference recluster entry now describes the no-op, and the sort_status table now explains that sort_key is the recorded key, falling back to the declared sort_by. CHANGELOG gets a Changed entry.

pgcolumnar.sort_status owner fix (#611, closes #608)

sort_status reads pgColumnar's internal catalogs, which carry no GRANT, so as an invoker-rights function it false-denied every non-superuser — including the table's own owner. It is now SECURITY DEFINER with a caller-SELECT check. CHANGELOG gets a Fixed entry.

Scope

Docs only. test/docs_style.sh passes (STE rules on docs/ + README.md; no em/en-dash in CHANGELOG.md).

🤖 Generated with Claude Code

…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
@ChronicallyJD
ChronicallyJD force-pushed the docs/415-recluster-sortstatus branch from 3f787d4 to c46389e Compare August 14, 2026 00:34
@ChronicallyJD ChronicallyJD changed the title docs: recluster self-gate and sort_status owner fix (#415, #608) docs: reference maintenance_due, recluster self-gate, and the sort_status owner fix (#415, #608) Aug 14, 2026

@jdatcmd jdatcmd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. Every claim verified against the merged code, style gate green.

Checked each statement against what actually shipped:

  • sort_status fix (#611/#608): accurate. The function is SECURITY DEFINER with require_caller_select (which gates on GetOuterUserId), so the CHANGELOG's "no caller gains access to a table they could not already read" is precisely right, not marketing.
  • recluster self-gate (#614): accurate to the three-condition gate I reviewed on that PR — recorded key matches, kind is zorder, 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_key now reports the recorded key, falling back to sort_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.

@jdatcmd
jdatcmd merged commit 88315bc into commandprompt:main Aug 14, 2026
10 checks passed
ChronicallyJD pushed a commit to ChronicallyJD/pgcolumnar that referenced this pull request Aug 14, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pgcolumnar.sort_status() false-denies a table's own owner (invoker-rights reads an internal catalog)

2 participants