Conversation
Deploying pgdog-docs with
|
| Latest commit: |
7fe6e18
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://556fc8b5.pgdog-docs.pages.dev |
| Branch Preview URL: | https://jk-transaction-now.pgdog-docs.pages.dev |
levkk
reviewed
Sep 17, 2026
| | `split_inserts` | Behavior when a sharded table receives a multi-row `INSERT`: `error` rejects the statement, `rewrite` fans the rows out to their shards, `ignore` forwards it unchanged. | `"error"` | | ||
| | `primary_key` | Behavior when an `INSERT` is missing a `BIGINT` primary key: `error` rejects the statement,<br>`rewrite` auto-injects `pgdog.unique_id()` for missing keys,<br>`ignore` allows the INSERT without modification. | `"ignore"` | | ||
| | `omni_non_deterministic_functions` | Behavior when an `INSERT` is headed to an omnisharded table using a function (such as date-time functions) that will not be consistent when performing the functions separately on each shard. Thus, it re-writes all such functions before performing the `INSERT` with constant values to maintain consistency. Example: `NOW()` is re-written to `2026-09-15 18:14:09.123456-05` (or whatever the current time is) before performing the individual `INSERT` operations. This applies to both `DEFAULT` table schema and functions called within a VALUES list of an `INSERT`. `ignore` allows the `INSERT` without modification. | `"ignore"` | | ||
| | `non_deterministic_functions` | Behavior when an `INSERT` is headed to an omnisharded table using a function (such as date-time functions) that will not be consistent when performing the functions separately on each shard. Thus, it re-writes all such functions before performing the `INSERT` with constant values to maintain consistency. It also handles re-writing `NOW()` (and other funtions that rely on transaction start time) to be consistent within a transaction. This is especially important when we write such a function to multiple Shards in a singular transaction. Example: `NOW()` is re-written to `2026-09-15 18:14:09.123456-05` (or whatever the current time is) before performing the individual `INSERT` operations. This applies to both `DEFAULT` table schema and functions called within a VALUES list of an `INSERT`. `ignore` allows the `INSERT` without modification. | `"ignore"` | |
Contributor
There was a problem hiding this comment.
Suggested change
| | `non_deterministic_functions` | Behavior when an `INSERT` is headed to an omnisharded table using a function (such as date-time functions) that will not be consistent when performing the functions separately on each shard. Thus, it re-writes all such functions before performing the `INSERT` with constant values to maintain consistency. It also handles re-writing `NOW()` (and other funtions that rely on transaction start time) to be consistent within a transaction. This is especially important when we write such a function to multiple Shards in a singular transaction. Example: `NOW()` is re-written to `2026-09-15 18:14:09.123456-05` (or whatever the current time is) before performing the individual `INSERT` operations. This applies to both `DEFAULT` table schema and functions called within a VALUES list of an `INSERT`. `ignore` allows the `INSERT` without modification. | `"ignore"` | | |
| | `non_deterministic_functions` | Behavior when an `INSERT` is headed to an omnisharded table using a function (such as date-time functions) that will not be consistent when performing the functions separately on each shard. Thus, it re-writes all such functions before performing the `INSERT` with constant values to maintain consistency. It also handles re-writing `NOW()` (and other functions that rely on transaction start time) to be consistent within a transaction. This is especially important when we write such a function to multiple shards in a singular transaction. Example: `NOW()` is re-written to `2026-09-15 18:14:09.123456-05` (or whatever the current time is) before performing the individual `INSERT` operations. This applies to both `DEFAULT` table schema and functions called within a VALUES list of an `INSERT`. `ignore` allows the `INSERT` without modification. | `"ignore"` | |
Contributor
There was a problem hiding this comment.
Also totally cool to give a short explanation in the table and a longer one somewhere below with examples.
Contributor
Author
There was a problem hiding this comment.
Which would you prefer? I'm happy to change it
Contributor
There was a problem hiding this comment.
Probably a short description in the table and expand it below in its own section with examples. It's a really cool feature, it deserves its own section imo
Co-authored-by: Lev Kokotov <levkk@users.noreply.github.com>
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.
No description provided.