-
Notifications
You must be signed in to change notification settings - Fork 890
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix race condition when creating CAgg
Creating one or more Continuous Aggregates over the same hypertable concurrently in different sessions lead to a race condition on checking for the existance of the trigger `ts_cagg_invalidation_trigger`. Fixed it by using the `OR REPLACE` option for the `CREATE TRIGGER` statement introduced in PG14 and for prior versions taking an `ShareUpdateExclusiveLock` and holding it until the end of the transaction when checking the trigger existance in the `check_trigger_exists_hypertable` function.
- Loading branch information
1 parent
c802c31
commit 0a4b43c
Showing
5 changed files
with
89 additions
and
12 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