-
-
Notifications
You must be signed in to change notification settings - Fork 902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove aggregate tables (fixes #4869) #5407
Draft
Nutomic
wants to merge
45
commits into
main
Choose a base branch
from
remove-aggregate-tables
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 18 commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
5ca40a7
migration
Nutomic a3b835f
update code
Nutomic 549e51f
tests
Nutomic 43ef0b5
triggers
Nutomic 2ea59bf
Merge branch 'main' into remove-aggregate-tables
Nutomic 31cbe18
fix
Nutomic cd29e85
fmt
Nutomic 61c5038
clippy
Nutomic b27aea0
post aggregate migration
Nutomic bb4bfe3
changes for post aggregate code
Nutomic 17d8d98
wip: update tests for post aggregate
Nutomic 4124f03
format
Nutomic c9aaaf0
fix partialeq
Nutomic 068aded
Merge branch 'main' into remove-aggregate-tables
Nutomic a88845e
trigger fix
Nutomic 1a1c366
fix post insert trigger
Nutomic af3035b
wip
Nutomic 41112a9
reorder
Nutomic bb30add
fixes
Nutomic 8cd04b4
Merge branch 'main' into remove-aggregate-tables
Nutomic f2d2852
Merge branch 'main' into remove-aggregate-tables
Nutomic 794240c
community aggregate migration
Nutomic 082cdfd
update code
Nutomic 261c0a1
triggers
Nutomic f145565
person aggregate migration
Nutomic 1ee4e63
person aggregate code
Nutomic f29c21d
person triggers
Nutomic 8c92d25
test fixes
Nutomic 707c418
fix scheduled task
Nutomic 85fc71d
update api tests
Nutomic 42015ab
Merge branch 'main' into remove-aggregate-tables
Nutomic cf86bc7
site_aggregates to local_site migration
Nutomic c9da44d
site_aggregates code changes
Nutomic 7badf7c
triggers, tests
Nutomic ac7b305
more fixes
Nutomic 47414e3
Merge branch 'main' into remove-aggregate-tables
Nutomic f732f63
Rename PersonPostAggregates to PostActions
Nutomic 25aa10a
Merge local_user_vote_display_mode into local_user
Nutomic 416ad1b
fix schema
Nutomic b0bc927
remove duplicate fields
Nutomic 4a6a5e6
remove "aggregates" from index names
Nutomic 4b7422a
uncomment indices
Nutomic f758ed8
if count = 0
Nutomic 1cf4a9c
Merge branch 'main' into remove-aggregate-tables
Nutomic 44c5990
remove commentaggregates
Nutomic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Oops, something went wrong.
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 was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was quite confused by this trigger because it actually replaces
thing
in the sql code withpost
/comment
, and so kept referring topost_aggregates
when that was already removed. I fixed it and ran into another problem: the trigger for comment updates the comment table, so it fires another trigger, and ultimately throws "stack depth limit exceeded". I fixed this by addingWHEN (pg_trigger_depth( ) = 0 )
to create_triggers()