-
Notifications
You must be signed in to change notification settings - Fork 695
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reland the alternative approach - works this time
- Loading branch information
1 parent
3e94678
commit 0aeafce
Showing
8 changed files
with
61 additions
and
47 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,15 +20,17 @@ ERROR: connection to the remote node [email protected]:1 failed | |
-- transaction block while Postgres does that. | ||
-- | ||
-- And when the application_name changes, Citus tries to re-assign | ||
-- the global pid and doing so for Citus internal backends doesn't | ||
-- require being in a transaction block and is safe. | ||
-- the global pid but it does so only for Citus internal backends, | ||
-- and doing so for Citus internal backends doesn't require being | ||
-- in a transaction block and is safe. | ||
-- | ||
-- However, for the client external backends (like us here), Citus | ||
-- doesn't try to re-assign the global pid if doing so requires catalog | ||
-- access and we're outside of a transaction block. Note that in that | ||
-- case the catalog access may only be needed to retrive the local node | ||
-- id when the cached local node is invalidated like what just happened | ||
-- here because of the failed citus_add_node() call made above. | ||
-- doesn't re-assign the global pid because it's not needed and it's | ||
-- not safe to do so outside of a transaction block. This is because, | ||
-- it would require performing a catalog access to retrive the local | ||
-- node id when the cached local node is invalidated like what just | ||
-- happened here because of the failed citus_add_node() call made | ||
-- above. | ||
-- | ||
-- So by failing here (rather than crashing), we ensure this behavior. | ||
ROLLBACK; | ||
|
This file contains 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