Conversation
- Add new excluded_schema regression test - Reformat multi-parameter SQL function definitions for readability (sub_create, sub_show_status, repset_create, repset_drop) This test demonstrates two issues: 1. table from an 'excluded' schema disables subscription. 2. Spock tests are unstable.
Previous commits exposed test instability due to non-deterministic ordering in query results. Changes made to stabilize output: - Replace SELECT * FROM spock.sub_create() with SELECT 1 FROM spock.sub_create() to avoid returning implementation-dependent OIDs. - Queries on spock.local_sync_status now join with spock.subscription to display subscription names instead of internal IDs, with proper ORDER BY on sub_name (using COLLATE "C") and additional columns (sync_kind, sync_nspname, sync_relname) where needed. - Add ORDER BY subscription_name COLLATE "C" to spock.sub_show_status() calls.
Centralize extension and schema skipping logic into helper functions build_exclude_extension_string() and build_exclude_schema_string(). Use dynamic list instead of fixed-size array for argument construction. Global skip lists for schemas and extensions (spock, lolor, snowflake) are now defined in spock_node.c and exported via spock_node.h.
Previously, tables in ignored schemas (spock, lolor, snowflake) could be added to replication sets, which would then cause replication failures at runtime. This change adds proactive validation that rejects such tables at the time they are added to a replication set, providing clear error messages with hints for resolution. Add EnsureRelationNotIgnored() function that checks both the global skip_schema and skip_extension lists. Call it from both replication_set_add_table() and replication_set_add_seq(). Also fix PG17 compatibility by using CheckRelationOidLockedByMe() instead of LockHeldByMe() with LOCKTAG, and move the test helper function pg_current_xlog_location() to the spock schema to avoid potential conflicts with user functions in public schema.
mason-sharp
reviewed
Feb 4, 2026
Member
mason-sharp
left a comment
There was a problem hiding this comment.
LGTM, just was not sure about a TODO comment.
| } | ||
|
|
||
| /* | ||
| * TODO: lookup subscriptions, including this schema, and check |
Member
There was a problem hiding this comment.
Is this an outdated comment?
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.
There are several questions that may arise if you look more closely at the changed code. But we just fixed the problem here.