#!/bin/bash
set -euo pipefail
#==============================================================#
# File      :   supa-kick
# Desc      :   used by supabase, use dummy update to kick lag
# Ctime     :   2025-05-08
# Mtime     :   2025-09-07
# Path      :   /pg/bin/supa-kick
# Deps      :   psql
# Docs      :   https://github.com/pgsty/pigsty/issues/581
# License   :   Apache-2.0 @ https://pigsty.io/docs/about/license/
# Copyright :   2018-2026  Ruohang Feng / Vonng (rh@vonng.com)
#==============================================================#

# perform regular dummy update on supabase _analytics table to kick the stupid lag feedback
psql supabase -Atqwc 'update _analytics.users SET id = 1 where id = 1;'