Skip to content

Documentation review changes#460

Open
ibrarahmad wants to merge 10 commits into
mainfrom
SPOC-498
Open

Documentation review changes#460
ibrarahmad wants to merge 10 commits into
mainfrom
SPOC-498

Conversation

@ibrarahmad
Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This pull request updates Spock documentation: it narrows conflict-resolution options to last_update_wins, standardizes parameter names, clarifies function error/return semantics and schema locations, documents new GUCs and sync-event transactional behavior, and corrects examples and monitoring descriptions.

Changes

Spock Documentation API Clarification

Layer / File(s) Summary
Conflict Resolution Strategy
README.md, docs/configuring.md, docs/conflict_types.md, docs/limitations.md, docs/troubleshooting.md
Documentation updated across multiple files to specify that only last_update_wins is the supported conflict resolution strategy, with previously documented alternatives removed.
Function Error Behavior
docs/spock_functions/functions/spock_node_drop_interface.md, docs/spock_functions/functions/spock_repset_*.md, docs/spock_functions/functions/spock_sub_*.md
Multiple function docs updated to document ERROR raises for failure cases instead of false returns (e.g., node_drop_interface, repset_add_seq, repset_remove_seq, repset_remove_table, sub_add_repset, sub_alter_interface).
Parameter Naming Standardization & RepSet Signatures
docs/spock_functions/repset_mgmt.md
Function parameter names standardized: sync_data/sync_structure renamed to synchronize_data/synchronize_structure across repset and subscription creation docs; repset signatures updated to use optional/DEFAULT parameters and include partition/include flags.
Sync Event Transaction Handling
docs/spock_functions/functions/spock_sync_event.md, docs/monitoring/spock_sync_event.md
spock.sync_event() signature documented as spock.sync_event(transactional boolean DEFAULT false) and examples updated to show transactional vs immediate WAL emission and spock.wait_for_sync_event(NULL, ...) usage.
Public Schema Functions
docs/spock_functions/functions/spock_max_proto_version.md, docs/spock_functions/functions/spock_min_proto_version.md, docs/spock_functions/gen_mgmt.md, docs/spock_functions/index.md
Documentation corrected to indicate spock_max_proto_version(), spock_min_proto_version(), spock_version(), and spock_version_num() are defined in the public schema and example invocations updated accordingly.
Subscription Management
docs/spock_functions/sub_mgmt.md
spock.sub_wait_table_sync() renamed to spock.table_wait_for_sync(), spock.sub_create parameters extended/renamed (e.g., synchronize_structure/synchronize_data, enabled, skip_schema), and spock.sub_show_status() now documents subscription_name defaulting to NULL.
New Features & Settings
docs/managing/spock_autoddl.md, docs/managing/read_only.md, docs/spock_release_notes.md
New spock.deny_all_ddl boolean setting documented for blocking cluster-wide DDL; read-only all mode behavior expanded with worker FATAL/restart mechanics and replication-slot retention guidance; release notes updated for exception-handling via spock.exception_behaviour.
Examples & Operational Guidance
docs/modify/zodan/zodan_tutorial.md, docs/troubleshooting.md, docs/recovery/catastrophic_node_failure.md, docs/monitoring/spock_info.md, docs/two_node_cluster.md, README.md
Tutorial timeout values changed to 1200 seconds and example result types to boolean; troubleshooting sections clarified for DDL re-enable and partitioned table handling; recovery Phase 1 example output simplified; monitoring view column descriptions corrected; DSN and subscription example fixes; README link updated to docs/index.md.

Poem

🐰 Through documentation's careful care,
Schemas and signatures laid bare,
Functions now clearly show their way,
With synchronize leading the day,
Old conflicts gone, one strategy to stay!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning No pull request description was provided by the author, making it impossible to assess whether any description relates to the changeset. Add a description explaining the purpose of the documentation changes, which include updates to conflict resolution, function signatures, recovery procedures, and configuration parameters.
Title check ❓ Inconclusive The title 'Documentation review changes' is vague and generic, using non-descriptive terms that fail to convey the specific nature or scope of the documentation updates. Use a more descriptive title that summarizes the main documentation updates, such as 'Update documentation for Spock 5.1 features and correct function signatures'.
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch SPOC-498

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented May 7, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Copy link
Copy Markdown

@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: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/modify/zodan/zodan_tutorial.md`:
- Around line 755-756: The doc currently lists "1200 seconds = 20 minutes" here
but earlier mentions an "internal 180-second timeout"; reconcile by either
aligning the numbers or adding an explicit clarification: update the sentence
that reads "The timeout (1200 seconds = 20 minutes) prevents waiting forever if
something goes wrong." to explain that the 1200s value is the overall
operation/monitoring timeout while ZODAN's internal per-request timeout remains
180 seconds (or change one of the values so both refer to the same timeout), and
also update the earlier "internal 180-second timeout" sentence to reference the
overall timeout if you choose to keep 1200s—ensure both phrases ("1200 seconds =
20 minutes" and "internal 180-second timeout") are consistent or clearly
differentiated in wording.
- Around line 847-848: The examples documenting pg_replication_slot_advance
incorrectly declare the result as AS t(result bool); update both occurrences to
reflect the actual return signature of pg_replication_slot_advance by using a
record type with the two columns (slot_name name, end_lsn pg_lsn) so the
examples match PostgreSQL v17/v18 and will copy/paste without errors; locate the
examples around the pg_replication_slot_advance usage and replace the incorrect
AS t(result bool) with an AS clause declaring (slot_name name, end_lsn pg_lsn)
for both instances.

In `@docs/monitoring/spock_sync_event.md`:
- Around line 71-78: The earlier inline call to spock.wait_for_sync_event() is
misleading because the function requires parameters; update the intro/reference
(where it currently shows spock.wait_for_sync_event() on Line 19) to a symbolic
form such as spock.wait_for_sync_event(...) so readers know it’s illustrative
and not a valid zero-arg invocation; ensure references to the procedure name
spock.wait_for_sync_event and the OUT placeholder usage (NULL) remain consistent
with the full example shown later.

In `@docs/spock_functions/gen_mgmt.md`:
- Around line 8-12: The table rows for spock_max_proto_version,
spock_min_proto_version, spock.node_info, spock_version, and spock_version_num
use trailing pipe style; update each row in docs/spock_functions/gen_mgmt.md to
use the markdownlint MD055 "leading_only" pipe style by removing the trailing
pipe at the end of each table line while keeping the same cell order and content
so the table renders identically but complies with the linter.

In `@docs/spock_functions/index.md`:
- Around line 23-25: The table rows for the spock function links (e.g.,
spock.repset_add_seq, spock.repset_add_all_seqs, spock.repset_remove_seq and the
other rows around the 44-53 block) are using leading-only pipe style; update
each Markdown table row to include trailing pipes so the table uses
leading_and_trailing style (add a trailing "|" at the end of each affected row)
to satisfy MD055.

In `@docs/spock_functions/repset_mgmt.md`:
- Around line 213-214: The quick-start "Removing a Table" SQL snippet uses the
old two-argument form; update that snippet to match the documented signature
spock.repset_remove_table(set_name name, relation regclass, include_partitions
boolean DEFAULT true) by adding the include_partitions boolean argument
(true/false as appropriate) to the call so both snippets show the same
three-argument form and reflect the include_partitions behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 78ffb7ac-e7ef-4502-9463-0a34d1e58f7b

📥 Commits

Reviewing files that changed from the base of the PR and between f294f83 and 2fafb3a.

📒 Files selected for processing (27)
  • README.md
  • docs/configuring.md
  • docs/conflict_types.md
  • docs/limitations.md
  • docs/managing/read_only.md
  • docs/managing/spock_autoddl.md
  • docs/modify/zodan/zodan_tutorial.md
  • docs/monitoring/spock_info.md
  • docs/monitoring/spock_sync_event.md
  • docs/recovery/catastrophic_node_failure.md
  • docs/spock_functions/functions/spock_max_proto_version.md
  • docs/spock_functions/functions/spock_min_proto_version.md
  • docs/spock_functions/functions/spock_node_drop_interface.md
  • docs/spock_functions/functions/spock_repset_add_seq.md
  • docs/spock_functions/functions/spock_repset_add_table.md
  • docs/spock_functions/functions/spock_repset_remove_seq.md
  • docs/spock_functions/functions/spock_repset_remove_table.md
  • docs/spock_functions/functions/spock_sub_add_repset.md
  • docs/spock_functions/functions/spock_sub_alter_interface.md
  • docs/spock_functions/functions/spock_sync_event.md
  • docs/spock_functions/gen_mgmt.md
  • docs/spock_functions/index.md
  • docs/spock_functions/repset_mgmt.md
  • docs/spock_functions/sub_mgmt.md
  • docs/spock_release_notes.md
  • docs/troubleshooting.md
  • docs/two_node_cluster.md

Comment on lines +755 to 756
The timeout (1200 seconds = 20 minutes) prevents waiting forever
if something goes wrong.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Timeout value is inconsistent with the earlier prerequisite note.

This section says 1200 seconds, but the earlier warning still says ZODAN uses an internal 180-second timeout. Please reconcile or explicitly explain the difference to avoid operator confusion.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/modify/zodan/zodan_tutorial.md` around lines 755 - 756, The doc
currently lists "1200 seconds = 20 minutes" here but earlier mentions an
"internal 180-second timeout"; reconcile by either aligning the numbers or
adding an explicit clarification: update the sentence that reads "The timeout
(1200 seconds = 20 minutes) prevents waiting forever if something goes wrong."
to explain that the 1200s value is the overall operation/monitoring timeout
while ZODAN's internal per-request timeout remains 180 seconds (or change one of
the values so both refer to the same timeout), and also update the earlier
"internal 180-second timeout" sentence to reference the overall timeout if you
choose to keep 1200s—ensure both phrases ("1200 seconds = 20 minutes" and
"internal 180-second timeout") are consistent or clearly differentiated in
wording.

Comment on lines +847 to 848
) AS t(result bool);
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

PostgreSQL documentation (v17/v18): What is the exact return signature of pg_replication_slot_advance(slot_name, lsn)?

💡 Result:

The exact return signature of pg_replication_slot_advance(slot_name name, upto_lsn pg_lsn) is a record with fields (slot_name name, end_lsn pg_lsn). This is consistent across PostgreSQL v17 [1] and v18 [2] official documentation, as well as secondary sources like pgPedia [3] and source code [4]. The function advances the confirmed position of the named replication slot to the specified LSN (or as far as possible without going backwards or beyond the current WAL insert location) and returns the slot name and the actual end LSN achieved [1][2].

Citations:


pg_replication_slot_advance result type is documented incorrectly in both examples.

AS t(result bool) is incorrect. The function returns (slot_name name, end_lsn pg_lsn) per PostgreSQL v17/v18 documentation, not a single boolean field. This will cause copy/paste failures when used in actual PostgreSQL code.

Proposed doc fix
-) AS t(result bool);
+) AS t(slot_name text, end_lsn pg_lsn);

Also applies to: lines 878-879

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/modify/zodan/zodan_tutorial.md` around lines 847 - 848, The examples
documenting pg_replication_slot_advance incorrectly declare the result as AS
t(result bool); update both occurrences to reflect the actual return signature
of pg_replication_slot_advance by using a record type with the two columns
(slot_name name, end_lsn pg_lsn) so the examples match PostgreSQL v17/v18 and
will copy/paste without errors; locate the examples around the
pg_replication_slot_advance usage and replace the incorrect AS t(result bool)
with an AS clause declaring (slot_name name, end_lsn pg_lsn) for both instances.

Comment on lines +71 to 78
```sql
CALL spock.wait_for_sync_event(NULL, 'provider_node', '0/16342B0', 10);
-- result: true (if applied within 10s), false otherwise
```

The first parameter is the OUT `result` placeholder; pass `NULL` for it in
the `CALL` statement and read the OUT value from the procedure result.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Clarify the earlier wait_for_sync_event invocation style to avoid a misleading zero-arg call.

This updated example is correct, but the earlier inline spock.wait_for_sync_event() (Line 19) reads like a literal invocation and conflicts with the required parameters shown here. Please make the intro reference explicitly symbolic (for example, spock.wait_for_sync_event(...)) for consistency.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/monitoring/spock_sync_event.md` around lines 71 - 78, The earlier inline
call to spock.wait_for_sync_event() is misleading because the function requires
parameters; update the intro/reference (where it currently shows
spock.wait_for_sync_event() on Line 19) to a symbolic form such as
spock.wait_for_sync_event(...) so readers know it’s illustrative and not a valid
zero-arg invocation; ensure references to the procedure name
spock.wait_for_sync_event and the OUT placeholder usage (NULL) remain consistent
with the full example shown later.

Comment thread docs/spock_functions/gen_mgmt.md Outdated
Comment on lines +8 to +12
| [spock_max_proto_version](functions/spock_max_proto_version.md) | Returns the maximum protocol version supported by Spock. Defined in the public schema (no `spock.` prefix). |
| [spock_min_proto_version](functions/spock_min_proto_version.md) | Returns the minimum protocol version supported by Spock. Defined in the public schema (no `spock.` prefix). |
| [spock.node_info](functions/spock_node_info.md) | Returns information about the local Spock node. |
| [spock.version](functions/spock_version.md) | Returns the version string of the Spock extension. |
| [spock.version_num](functions/spock_version_num.md) | Returns the version number of Spock as an integer. |
| [spock_version](functions/spock_version.md) | Returns the version string of the Spock extension. Defined in the public schema (no `spock.` prefix). |
| [spock_version_num](functions/spock_version_num.md) | Returns the version number of Spock as an integer. Defined in the public schema (no `spock.` prefix). |
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix table pipe style to match markdownlint config.

These rows use trailing pipes, but markdownlint expects leading_only style (MD055) in this file.

Suggested fix
-| [spock_max_proto_version](functions/spock_max_proto_version.md) | Returns the maximum protocol version supported by Spock. Defined in the public schema (no `spock.` prefix). |
-| [spock_min_proto_version](functions/spock_min_proto_version.md) | Returns the minimum protocol version supported by Spock. Defined in the public schema (no `spock.` prefix). |
+| [spock_max_proto_version](functions/spock_max_proto_version.md) | Returns the maximum protocol version supported by Spock. Defined in the public schema (no `spock.` prefix).
+| [spock_min_proto_version](functions/spock_min_proto_version.md) | Returns the minimum protocol version supported by Spock. Defined in the public schema (no `spock.` prefix).
 | [spock.node_info](functions/spock_node_info.md) | Returns information about the local Spock node. |
-| [spock_version](functions/spock_version.md) | Returns the version string of the Spock extension. Defined in the public schema (no `spock.` prefix). |
-| [spock_version_num](functions/spock_version_num.md) | Returns the version number of Spock as an integer. Defined in the public schema (no `spock.` prefix). |
+| [spock_version](functions/spock_version.md) | Returns the version string of the Spock extension. Defined in the public schema (no `spock.` prefix).
+| [spock_version_num](functions/spock_version_num.md) | Returns the version number of Spock as an integer. Defined in the public schema (no `spock.` prefix).
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 8-8: Table pipe style
Expected: leading_only; Actual: leading_and_trailing; Unexpected trailing pipe

(MD055, table-pipe-style)


[warning] 9-9: Table pipe style
Expected: leading_only; Actual: leading_and_trailing; Unexpected trailing pipe

(MD055, table-pipe-style)


[warning] 10-10: Table pipe style
Expected: leading_only; Actual: leading_and_trailing; Unexpected trailing pipe

(MD055, table-pipe-style)


[warning] 11-11: Table pipe style
Expected: leading_only; Actual: leading_and_trailing; Unexpected trailing pipe

(MD055, table-pipe-style)


[warning] 12-12: Table pipe style
Expected: leading_only; Actual: leading_and_trailing; Unexpected trailing pipe

(MD055, table-pipe-style)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/spock_functions/gen_mgmt.md` around lines 8 - 12, The table rows for
spock_max_proto_version, spock_min_proto_version, spock.node_info,
spock_version, and spock_version_num use trailing pipe style; update each row in
docs/spock_functions/gen_mgmt.md to use the markdownlint MD055 "leading_only"
pipe style by removing the trailing pipe at the end of each table line while
keeping the same cell order and content so the table renders identically but
complies with the linter.

Comment thread docs/spock_functions/index.md
Comment on lines +213 to +214
`spock.repset_remove_table(set_name name, relation regclass,
include_partitions boolean DEFAULT true)`
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Align the earlier “Removing a Table” SQL snippet with this updated signature.

This section correctly documents include_partitions, but the earlier quick-start snippet still shows the two-argument form. Please update that earlier snippet so users don’t get conflicting function forms in the same page.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/spock_functions/repset_mgmt.md` around lines 213 - 214, The quick-start
"Removing a Table" SQL snippet uses the old two-argument form; update that
snippet to match the documented signature spock.repset_remove_table(set_name
name, relation regclass, include_partitions boolean DEFAULT true) by adding the
include_partitions boolean argument (true/false as appropriate) to the call so
both snippets show the same three-argument form and reflect the
include_partitions behavior.

Clarify function definition location and add details.
Clarify the schema definition of the spock_min_proto_version function and its read-only nature.
@mason-sharp mason-sharp changed the title Documentaion changes. Documentation review changes May 7, 2026
Copy link
Copy Markdown

@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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/spock_functions/gen_mgmt.md`:
- Around line 89-99: The return description for spock_version is incorrect:
update the wording in the spock_version() documentation so it says the function
returns a version string (e.g., "Returns the version string of the Spock
extension") instead of "version number"; locate the spock_version section and
change the phrasing where it currently reads "version number" to "version
string" to ensure consistency with the function's actual return type.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 74f75a16-e138-4070-9761-c3bc51c49ca8

📥 Commits

Reviewing files that changed from the base of the PR and between 4b3ff35 and d7ae8e7.

📒 Files selected for processing (1)
  • docs/spock_functions/gen_mgmt.md

Comment thread docs/spock_functions/gen_mgmt.md
Copy link
Copy Markdown
Member

@susan-pgedge susan-pgedge left a comment

Choose a reason for hiding this comment

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

I made a few little changes, and checked them in - looks great, thank you!

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.

3 participants