diff options
author | Sami Hiltunen <shiltunen@gitlab.com> | 2022-04-25 17:46:13 +0300 |
---|---|---|
committer | Sami Hiltunen <shiltunen@gitlab.com> | 2022-04-25 17:46:13 +0300 |
commit | 3482d0e7dd3df87b5724d587a331a9409c228fc4 (patch) | |
tree | 81b8cb6855c30ef0e4f593d6286c8e822c1461e0 /_support | |
parent | 1d3a77150ab05beee3b7b2085c417c0b00501e58 (diff) | |
parent | 5c9feb4e8e3175f1f80aae2f452e9e676133d14f (diff) |
Merge branch 'smh-verification-trigger-only-generation' into 'master'
Ignore verification columns for read-only cache updates
Closes #4159
See merge request gitlab-org/gitaly!4468
Diffstat (limited to '_support')
-rw-r--r-- | _support/praefect-schema.sql | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/_support/praefect-schema.sql b/_support/praefect-schema.sql index 813d4fa89..a1aa215b1 100644 --- a/_support/praefect-schema.sql +++ b/_support/praefect-schema.sql @@ -72,8 +72,10 @@ CREATE FUNCTION public.notify_on_change() RETURNS trigger SELECT JSON_AGG(obj) INTO msg FROM ( SELECT JSONB_BUILD_OBJECT('virtual_storage', virtual_storage, 'relative_paths', ARRAY_AGG(DISTINCT relative_path)) AS obj - FROM NEW - FULL JOIN OLD USING (virtual_storage, relative_path) + FROM NEW AS new_value + FULL JOIN OLD AS old_value USING (virtual_storage, relative_path) + WHERE ( COALESCE(new_value.generation, -1) != COALESCE(old_value.generation, -1) ) + OR ( new_value.relative_path != old_value.relative_path ) GROUP BY virtual_storage ) t; WHEN 'DELETE' THEN |