From 4749baad2416399f71be5703028af6724a9a1d01 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 6 Feb 2024 14:21:57 -0700 Subject: [PATCH 1/2] Add query to update local cache of a remote user's device list to docs --- docs/usage/administration/useful_sql_for_admins.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/usage/administration/useful_sql_for_admins.md b/docs/usage/administration/useful_sql_for_admins.md index 9f2cc9b9572..41755cd3b60 100644 --- a/docs/usage/administration/useful_sql_for_admins.md +++ b/docs/usage/administration/useful_sql_for_admins.md @@ -205,3 +205,12 @@ SELECT user_id, device_id, user_agent, TO_TIMESTAMP(last_seen / 1000) AS "last_s FROM devices WHERE last_seen < DATE_PART('epoch', NOW() - INTERVAL '3 month') * 1000; ``` + +## Clear the cache of a remote user's device list + +Forces the resync of a remote user's device list - if you have somehow cached a bad state, and the remote server is +will not send out a device list update. +```sql +INSERT INTO device_lists_remote_resync +VALUES ('USER_ID', (EXTRACT(epoch FROM NOW()) * 1000)::BIGINT); +``` From fafef17f9bd5e4cc3b66063080b5e7ad3c4ece1f Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 6 Feb 2024 14:25:59 -0700 Subject: [PATCH 2/2] changelog --- changelog.d/16892.doc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/16892.doc diff --git a/changelog.d/16892.doc b/changelog.d/16892.doc new file mode 100644 index 00000000000..dd82b491126 --- /dev/null +++ b/changelog.d/16892.doc @@ -0,0 +1 @@ +Add a query to force a refresh of a remote user's device list to the "Useful SQL for Admins" documentation page. \ No newline at end of file