Skip to content

Change readonly parameter values in documentation#375

Open
zaidshabbir25 wants to merge 1 commit intomainfrom
zaidshabbir25-patch-1
Open

Change readonly parameter values in documentation#375
zaidshabbir25 wants to merge 1 commit intomainfrom
zaidshabbir25-patch-1

Conversation

@zaidshabbir25
Copy link
Contributor

Updated the documentation to reflect changes in the readonly parameter values.

Updated the documentation to reflect changes in the readonly parameter values.
@coderabbitai
Copy link

coderabbitai bot commented Mar 4, 2026

📝 Walkthrough

Walkthrough

Documentation for the spock.readonly setting is updated to replace 'on' with 'all' in ALTER SYSTEM and SET command examples. The available values for the setting are now explicitly documented as off, user, and all. Status query functionality remains unchanged.

Changes

Cohort / File(s) Summary
Read-Only Mode Documentation
docs/managing/read_only.md
Updated spock.readonly setting documentation: replaced 'on' with 'all' in ALTER SYSTEM and SET command examples; added explicit listing of available values (off, user, all); SHOW command unchanged.

Poem

🐰 The docs hop brighter, clearer still!
Where 'on' became 'all' by rabbit's quill,
Three values dance—off, user, all—
Read-only modes, no more confusion's call,
Documentation polished, crystal fine,
Clarity in every blessed line! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: updating documentation for readonly parameter values.
Description check ✅ Passed The description is related to the changeset, noting that documentation was updated to reflect changes in readonly parameter values.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch zaidshabbir25-patch-1

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/managing/read_only.md`:
- Line 48: Update the docs to reflect the three-mode semantics implemented in
code: replace binary "on/off" language with the modes "off, user, all" and
describe that spock_readonly (the configuration variable) comparisons use
READONLY_USER to block non-readonly statements for all non-superuser exemptions
removed—i.e., when spock_readonly >= READONLY_USER regular sessions are
prevented from executing non-readonly statements—and that the only distinction
for replication is in spock_apply.c where READONLY_ALL additionally blocks
replication apply; reference spock_readonly, READONLY_USER, READONLY_ALL,
spock_readonly.c, and spock_apply.c so the doc text matches enforcement.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fadf753d-118b-44ab-bc73-003f75e777d0

📥 Commits

Reviewing files that changed from the base of the PR and between 50764f4 and eb34499.

📒 Files selected for processing (1)
  • docs/managing/read_only.md

- When the cluster is in read-only mode, only non-superusers are restricted to read-only operations. Superusers can continue to perform both read and write operations.
- By using a GUC parameter, you can easily manage the cluster's read-only status through standard PostgreSQL configuration mechanisms.

- Available values for readonly are: off, user, all
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Behavior docs are now internally inconsistent after adding off, user, all.

After introducing three modes, nearby text still describes binary on/off output (Line 42) and says superusers are exempt (Lines 3/21/46). That does not match enforcement in src/spock_readonly.c:62-96 (spock_readonly >= READONLY_USER blocks non-read-only statements regardless of role) and the only user vs all distinction appears in replication apply (src/spock_apply.c:2407-2425, where all blocks apply). Please update the behavior description in this doc section to reflect actual mode semantics.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/managing/read_only.md` at line 48, Update the docs to reflect the
three-mode semantics implemented in code: replace binary "on/off" language with
the modes "off, user, all" and describe that spock_readonly (the configuration
variable) comparisons use READONLY_USER to block non-readonly statements for all
non-superuser exemptions removed—i.e., when spock_readonly >= READONLY_USER
regular sessions are prevented from executing non-readonly statements—and that
the only distinction for replication is in spock_apply.c where READONLY_ALL
additionally blocks replication apply; reference spock_readonly, READONLY_USER,
READONLY_ALL, spock_readonly.c, and spock_apply.c so the doc text matches
enforcement.

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.

1 participant