-
Notifications
You must be signed in to change notification settings - Fork 246
Open
Conversation
my-ship-it
marked this pull request as ready for review
September 8, 2026 09:17
my-ship-it
requested review from
Smyatkin-Maxim,
leborchuk,
reshke,
tuhaihe,
x4m and
yjhjstz
September 8, 2026 09:18
leborchuk
commented
Sep 8, 2026
Contributor
That's awesome! I'll try to read it, cannot say could read the whole document within a day, but try my best )
my-ship-it
commented
Sep 8, 2026
Contributor
Author
That's awesome! I'll try to read it, cannot say could read the whole document within a day, but try my best )
Thanks a lot! Some oversights are inevitable. Really appreciate your time — no pressure to finish it in one day, just take your time.
Add a developer-oriented handbook for the Cloudberry kernel: 21 chapters and 104 sections covering storage, indexing, the catalog, the executor (single-node and distributed), the dual optimizer (PostgreSQL planner and ORCA), transactions, HA/recovery, and resource management. It is organised into five parts after the structure of Rogov's "PostgreSQL 14 Internals". The content is written for Docusaurus so that apache/cloudberry-site can pull it in as a submodule with a sparse checkout limited to docs/core-internals, served by its own docs plugin instance with an autogenerated sidebar -- the same arrangement already used for the PXF documentation. It renders on GitHub as-is too. What the chapters contain: - 372 code excerpts, each fenced with title="file:line" so a reader can go straight to the source it was read from - 487 psql sessions captured from a running cluster, split into an input block and an output block - 113 mermaid diagrams and 64 SVG figures - internal cross-references that resolve to section anchors and are validated at build time Host names, addresses and install paths belonging to the machine the sessions were captured on are replaced with documentation-safe equivalents of identical width, so the column alignment of captured output is preserved. Every file carries the ASF license header, so no pom.xml RAT exclusions are needed. The tree was verified against Docusaurus 3 with MDX v3: no compilation errors, no broken links, no broken anchors. See docs/core-internals/README.md for the layout, the conventions and a note on maintenance -- file and line references describe a point in the tree's history and will drift, which the title="file:line" convention makes machine-checkable.
my-ship-it
force-pushed
the
doc/core-internals-handbook
branch
from
September 9, 2026 02:04
fa603a4 to
4208df9
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Uh oh!
There was an error while loading. Please reload this page.
Summary
Adds a developer-oriented handbook for the Cloudberry kernel under
docs/core-internals/— 21 chapters, 104 sections, organised into fiveparts after the structure of Rogov's PostgreSQL 14 Internals.
Coverage: storage and data layout (heap, AO/AOCS, PAX, indexes, the
catalog), transactions and MVCC (isolation, snapshots, vacuum, locks and
the global deadlock detector, distributed transactions and 2PC), query
processing (stages, statistics, the PostgreSQL planner, distributed
planning, ORCA, the executor, Motion and the interconnect), high
availability and recovery, and resource management.
Read the handbook as a PDF (652 pages, 20 MB) so you can
review the content without building the site. All 113 diagrams are rendered
as vector SVG and the text is selectable and searchable. It was produced by
printing the handbook's HTML edition from a headless browser, so layout and
typography match the source. The file is a release asset, deliberately not
part of this diff — a 20 MB binary does not belong in the repository's
history.
What the chapters contain
title="file:line"pointing at the source it was read frompsqlsessionsoutputblock — transcripts from a running cluster, not illustrations§N.Mlinks that resolve to section anchors and are checked at build timeWhy here, and how the site uses it
The directory is written for Docusaurus so that
apache/cloudberry-sitecan pull it in as a git submodule with a sparse checkout limited to
docs/core-internals, served by its own docs plugin instance with anautogenerated sidebar — the same arrangement already used for the PXF
documentation (apache/cloudberry-site#372). Keeping the source next to the
code it describes means a change to the engine and the change to its
description can travel in one commit.
A follow-up PR against
cloudberry-sitewill add the submodule and thethree config touch points. It has to come second, since the submodule
needs a commit on this side to point at.
Nothing here depends on site-level configuration except one small MDX
component: 37 figures are CSS-laid-out HTML rather than SVG, and are handed
to that component as a string so MDX does not try to parse them as JSX. The
component and its CSS are a few lines and are described in the README.
Verification
broken links, no broken anchors, 23 pages, all 64 figures resolved.
so no
pom.xmlexclusions are needed.paths from the machine the sessions were captured on are replaced with
documentation-safe equivalents of identical width, so the column
alignment of captured output is preserved. Verified across the markdown,
the HTML and the PDF.
Testing
make installcheckmake -C src/test installcheck-cbdb-parallelImpact
Performance: None. No code is touched.
User-facing changes: New documentation. Nothing changes for existing
users until
cloudberry-sitelinks it in.Dependencies: None added to this repository. A site that renders the
diagrams needs
@docusaurus/theme-mermaid; without it the mermaid blocksdegrade to code blocks and everything else renders unchanged.
Checklist
Additional Context
On maintenance. The chapters describe a specific point in the tree's
history. Prose is the durable part; line numbers are the perishable part.
The
title="file:line"convention is machine-readable on purpose — a CIjob can verify that every cited path still exists, which catches the worst
class of drift (a file that moved or was deleted) cheaply. I would rather
agree on that check in review than add it unilaterally here.
On the size of the review. This is a large diff and I do not expect
anyone to read 29k lines in a PR. Reading order that costs the least: the
attached PDF for the content,
docs/core-internals/README.mdfor thelayout and conventions, and one chapter of your choice for the texture —
ch02 is the shortest, ch18 the most demanding. Chapter-level corrections
are welcome as ordinary follow-up PRs.
On the branch base. This branch is cut from an April snapshot of
mainrather than today's tip, so GitHub will report it as behind. That is an
artifact of how it was pushed, not of the content: all 93 files are new
paths under
docs/core-internals/, nothing else is touched, and the diffGitHub computes is exactly those 93 additions. Happy to rebase onto current
mainif you would rather review it that way.On AI assistance. Disclosed above per
AI_GUIDELINE.md. The generationwas AI-assisted; the technical claims, the code citations and the captured
sessions are mine to answer for, and I will answer review questions
directly rather than through a tool.