-
Notifications
You must be signed in to change notification settings - Fork 2
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cf/6252~1
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cf/6252
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 4 commits
- 22 files changed
- 2 contributors
Commits on Dec 25, 2025
-
Add configurable conflict log table for Logical Replication
This patch adds a feature to provide a structured, queryable record of all logical replication conflicts. The current approach of logging conflicts as plain text in the server logs makes it difficult to query, analyze, and use for external monitoring and automation. This patch addresses these limitations by introducing a configurable conflict_log_destination=('log'/'table'/'all') option in the CREATE SUBSCRIPTION command. If the user chooses to enable logging to a table (by selecting 'table' or 'all'), an internal logging table named conflict_log_table_<subid> is automatically created within a dedicated, system-managed namespace named pg_conflict. This table is linked to the subscription via an internal dependency, ensuring it is automatically dropped when the subscription is removed. The conflict details, including the original and remote tuples, are stored in JSON columns, providing a flexible format to accommodate different table schemas. The log table captures essential attributes such as local and remote transaction IDs, LSNs, commit timestamps, and conflict type, providing a complete record for post-mortem analysis. This feature will make logical replication conflicts easier to monitor and manage, significantly improving the overall resilience and operability of replication setups. The conflict log tables will not be included in a publication, even if the publication is configured to include ALL TABLES or ALL TABLES IN SCHEMA.Dilip Kumar authored and Commitfest Bot committedDec 25, 2025 Configuration menu - View commit details
-
Copy full SHA for a381b41 - Browse repository at this point
Copy the full SHA a381b41View commit details -
Implement the conflict insertion infrastructure for the conflict log …
…table This patch introduces the core logic to populate the conflict log table whenever a logical replication conflict is detected. It captures the remote transaction details along with the corresponding local state at the time of the conflict. Handling Multi-row Conflicts: A single remote tuple may conflict with multiple local tuples (e.g., in the case of multiple_unique_conflicts). To handle this, the infrastructure creates a single row in the conflict log table for each remote tuple. The details of all conflicting local rows are aggregated into a single JSON array in the local_conflicts column. The JSON array uses the following structured format: [ { "xid": "1001", "commit_ts": "2025-12-25 10:00:00+05:30", "origin": "node_1", "key": {"id": 1}, "tuple": {"id": 1, "val": "old_data"} }, ... ] Example of querying the structured conflict data: SELECT remote_xid, relname, remote_origin, local_conflicts[1] ->> 'xid' AS local_xid, local_conflicts[1] ->> 'tuple' AS local_tuple FROM myschema.conflict_log_history2; remote_xid | relname | remote_origin | local_xid | local_tuple ------------+----------+---------------+-----------+--------------------- 760 | test | pg_16406 | 771 | {"a":1,"b":10} 765 | conf_tab | pg_16406 | 775 | {"a":2,"b":2,"c":2}Dilip Kumar authored and Commitfest Bot committedDec 25, 2025 Configuration menu - View commit details
-
Copy full SHA for 2059bb9 - Browse repository at this point
Copy the full SHA 2059bb9View commit details -
Dilip Kumar authored and Commitfest Bot committed
Dec 25, 2025 Configuration menu - View commit details
-
Copy full SHA for 7d119b4 - Browse repository at this point
Copy the full SHA 7d119b4View commit details -
[CF 6252] v16 - Proposal: Conflict log history table for Logical Repl…
…ication This branch was automatically generated by a robot using patches from an email thread registered at: https://commitfest.postgresql.org/patch/6252 The branch will be overwritten each time a new patch version is posted to the thread, and also periodically to check for bitrot caused by changes on the master branch. Patch(es): https://www.postgresql.org/message-id/CAFiTN-u+_mFj9caYYFO7=_YHFXk5y=vvOm2H2=5hctYktmAVGA@mail.gmail.com Author(s): Dilip Kumar
Commitfest Bot committedDec 25, 2025 Configuration menu - View commit details
-
Copy full SHA for fbb915b - Browse repository at this point
Copy the full SHA fbb915bView commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff cf/6252~1...cf/6252