Skip to content

docs: clarify PostgreSQL storage and backup coverage - #202086

Merged
VACInc merged 1 commit into
openclaw:mainfrom
VACInc:docs-postgres-storage-scope
Nov 20, 2026
Merged

VACInc merged 1 commit into
openclaw:mainfrom
VACInc:docs-postgres-storage-scope

Conversation

@VACInc

@VACInc VACInc commented Nov 19, 2026

Copy link
Copy Markdown
Member

Summary

High Level TLDR

A PostgreSQL-backed Gateway still keeps Knowledge data on local disk. Third-party plugins can open PostgreSQL stores through the SDK and need their own migration and recovery procedures. The operator and SDK guides now spell out both boundaries.

What Problem This Solves

Operators planning a move or restore can miss Knowledge’s local database and vault files. Plugin authors following the SDK engine setup can also miss the separate requirements for moving or recovering a private store.

User Impact

Operators can identify the Knowledge files to keep together and see which PostgreSQL stores the built-in backup and port tools handle.

Root Cause

The engine registry selects PostgreSQL for five built-in families. Knowledge opens local SQLite databases independently. Knowledge has no managed SQLite backup resource in its manifest, so archive creation treats its included SQLite files as ordinary files. The SDK resolves PostgreSQL input for external stores. Port and PostgreSQL backup and restore use a fixed provider registry. The docs left those limits implicit.

Evidence

Real behavior proof

The engine selector returned PostgreSQL for state, agent, Workboard, Logbook, and Team Reports with database.engine: "postgres". It kept all three fixed safety journals on SQLite.

A focused docs check read both guides on main and on this patch. Main missed all three assertions. The check looked for the location of Knowledge’s local data, the operator guidance for private plugin PostgreSQL stores, and the SDK port and backup boundary. All three passed on the patch. pnpm docs:list --headings showed both pages and the linked section headings.

What was not tested

Docs validation used no Gateway, PostgreSQL server, or paid model calls. A runtime backup and restore drill was outside this docs patch.

Verification

  • pnpm docs:list --headings passed.
  • git diff --check passed.
  • The commit hook formatted both Markdown files. The committed blobs match the reviewed files.
  • Autoreview (P0–P3) found no actionable findings on the final two-file diff against 1fbcec108f4.

@clawsweeper

clawsweeper Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime plugin: file-transfer size: XS labels Nov 19, 2026
@VACInc
VACInc marked this pull request as ready for review November 19, 2026 22:17
@clawsweeper clawsweeper Bot added clawsweeper:intake:docs Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:docs Preliminary submission classification; full source review pending. labels Nov 19, 2026
@clawsweeper

clawsweeper Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Clarifies Knowledge’s local storage and the limits of built-in PostgreSQL migration, backup, and restore coverage.

Example: An operator uses database.engine: "postgres" with the Knowledge memory provider.

  • Before: The PostgreSQL guide does not explicitly identify Knowledge’s local databases and vaults as a separate recovery unit.
  • After: The guide identifies knowledge/registry.sqlite, store state.sqlite files, and vault directories, and advises copying them together while the Gateway is stopped.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused, accurate documentation with source-backed claims, valid link targets, passing supplied checks, and no findings.
Proof confidence 🌊 off-meta tidepool Not applicable: Only explanatory Markdown changes; the documented storage and backup boundaries were checked against their production owners, with no runtime code executed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Docs · Worth it: Yes · Fix scope: Complete
User problem: Operators can overlook Knowledge’s local recovery files, and plugin authors can mistake PostgreSQL engine support for built-in migration and backup coverage.
Reason: The maintainer-authored clarification addresses a concrete operational misunderstanding and accurately preserves existing behavior.

Merge readiness

✅ Ready for maintainer review

This PR provides useful, source-backed storage and recovery guidance without changing runtime behavior; no actionable defects were found.

Priority: P3
Reviewed head: aa2072b7ed13d85609b72d05f7cf67ce4936bdc3

Before merge

None.

Findings

None.

Agent review details

How this fits together

Database configuration selects engines for five registered families; Knowledge owns separate local storage, while backup and restore use registered providers and declared file resources.

flowchart TD
  A[Database configuration] --> B[Five family engine selections]
  B --> C[Registered PostgreSQL providers]
  C --> D[Port backup and restore]
  E[Knowledge registry and vaults] --> F[Local file backup]
  G[Private plugin stores] --> H[Plugin recovery procedures]
Loading

Technical review

Best possible solution:

Merge the focused documentation clarification through the normal landing workflow.

Do we have a high-confidence way to reproduce the issue?

This documentation-only change needs no runtime reproduction; source inspection confirms the storage layout and provider boundary it describes.

Is this the best way to solve the issue?

The patch is the smallest complete clarification: it updates existing operator and SDK guidance, links authoritative details, and introduces no competing implementation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 0167852c1cfc.

Provenance checked

  • Local storage exclusions in the PostgreSQL operator guide keeps the original intent (1e78ee6: The original operator guide distinguished server-backed stores from local artifacts and emphasized matched recovery units.)
  • PostgreSQL archive coverage and restoration keeps the original intent (b7bb85a: Registered providers restore producer-declared capsules while unowned exports remain ordinary user files.)
  • SDK external-store engine selection keeps the original intent (995a9ae: Built-in stores use family selections while external stores resolve the default engine independently.)

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 995a9ae adds docs/plugins/sdk-runtime.md:454 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 995a9ae02145; files: docs/plugins/sdk-runtime.md)
  • Mitchell Etzel: Raw commit f7b61f0 adds docs/gateway/postgresql.md:670 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f7b61f049a5c; files: docs/gateway/postgresql.md)

PR surface

Docs +18. Total +18 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 2 20 2 +18
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 20 2 +18

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P3: A low-risk documentation improvement makes existing storage and recovery boundaries easier to understand.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: A low-risk documentation improvement makes existing storage and recovery boundaries easier to understand.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 19, 2026, 5:33 PM ET / 22:33 UTC.

@VACInc
VACInc merged commit 6ca56cd into openclaw:main Nov 20, 2026
139 checks passed
@VACInc

VACInc commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Merged via squash.

@VACInc
VACInc deleted the docs-postgres-storage-scope branch November 20, 2026 16:21
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 21, 2026
maplel pushed a commit to maplel/openclaw that referenced this pull request Nov 24, 2026
…law#194384)

* docs: clarify PostgreSQL conformance coverage

* fix(cron): keep one-shot finalization working on PostgreSQL 16

* test(database): reuse cron conformance for JSON conversion regression

* test(postgres): accept fractional explain row counts

(cherry picked from commit 7ab0143)

Release adaptation: Only engine-owned jsonValue and retained cron enabled JSON replacement; preserve native boolean type with PG16 explicit ::json and SQLite json(). Omit unrelated PG docs/EXPLAIN test edits; retained one-shot enabled-transition caller present on baseline.

Follow-up dispositions: e029e18 docs: document isolated PostgreSQL restore drills (openclaw#202704); 49f0740 fix(database): report disabled memory after a port (openclaw#202630); a80b564 fix: keep database workers healthy after silent connection loss (openclaw#201856); 3d91af2 fix(config): reject reserved PostgreSQL schema prefixes (openclaw#202097); 835d722 fix: catch incompatible ownership before porting to SQLite (openclaw#202101); 67796a6 fix: keep scheduled Git backups current on PostgreSQL (openclaw#201870); cc849dd fix: recover lease heartbeats after a PostgreSQL connection loss (openclaw#201858); 6594caf fix: prepare macOS runtime pins without the PostgreSQL secret (openclaw#202102); 6ca56cd docs: clarify PostgreSQL storage and backup coverage (openclaw#202086); a079190 fix(postgres): chat history slows under concurrent reads (openclaw#190129); 2ff4256 feat(database): keep PostgreSQL rollback captures in PostgreSQL (openclaw#196236); 96c685b feat(backup): restore PostgreSQL stores into a staging database for restore drills (openclaw#194808); fb83d65 fix: reduce transcript allocation when preparing native context seeds; 71ec4d2 fix(config): keep Workboard PostgreSQL upgrades readable (openclaw#194648); b6ed907 perf(sessions): persist active transcript facts for hydration (openclaw#193682)

Validation: Baseline cron generated json(bound text) on PostgreSQL where json(text) is unavailable; helper and focused boolean regression retained. Exact PostgreSQL16 server proof unavailable; focused SQLite/helper tests queued. diff check passed.

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 38fdd9b52704d588d9ca24ef8e391d644961c985)
(cherry picked from commit fb935e6912388314851b05cb698ef038b83bbd07)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. plugin: file-transfer rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant