All checks were successful
screenText sammelt Ansagen per MutationObserver und vergleicht sie; wartet auf leere Region mit registrierter Ansage bzw. 400 ms Ruhe. Unload-Skript mit TCP-Schutz, Doku-Praezisierungen. Refs #3 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
46 lines
1.8 KiB
PL/PgSQL
46 lines
1.8 KiB
PL/PgSQL
-- Entfernt das synthetische Volumen aus catalog_search_perf_load.sql (alle Zeilen mit ID-Praefix 9e4f0000-).
|
|
-- Alternative Titel, Verlags-, Genre- und Mechanik-Zuordnungen verschwinden per on delete cascade mit den Spielen.
|
|
-- Aufruf (gleiche Schutzstufen wie das Ladeskript):
|
|
-- docker exec -i supabase_db_shuffle psql -U postgres -d postgres -X -v confirm_local=yes \
|
|
-- < supabase/perf/catalog_search_perf_unload.sql
|
|
\set ON_ERROR_STOP on
|
|
\if :{?confirm_local}
|
|
\else
|
|
\set confirm_local no
|
|
\endif
|
|
select :'confirm_local' = 'yes' as confirm_ok, coalesce(:'HOST', '') like '/%' as socket_ok \gset
|
|
\if :confirm_ok
|
|
\else
|
|
\echo 'Abbruch: mit -v confirm_local=yes aufrufen.'
|
|
do $abort$ begin raise exception 'Abbruch (siehe Meldung davor)'; end $abort$;
|
|
\endif
|
|
\if :socket_ok
|
|
\else
|
|
\echo 'Abbruch: nur per Unix-Socket im lokalen Container.'
|
|
do $abort$ begin raise exception 'Abbruch (siehe Meldung davor)'; end $abort$;
|
|
\endif
|
|
|
|
do $guard$
|
|
begin
|
|
if inet_server_addr() is not null then
|
|
raise exception 'Abbruch: Verbindung ueber TCP (inet_server_addr gesetzt); nur Unix-Socket im lokalen Container.';
|
|
end if;
|
|
end
|
|
$guard$;
|
|
|
|
begin;
|
|
delete from public.games where id::text like '9e4f0000-%';
|
|
delete from public.publishers where id::text like '9e4f0000-%';
|
|
commit;
|
|
|
|
vacuum (analyze) public.games;
|
|
vacuum (analyze) public.game_alt_titles;
|
|
vacuum (analyze) public.publishers;
|
|
vacuum (analyze) public.game_publishers;
|
|
vacuum (analyze) public.game_genres;
|
|
vacuum (analyze) public.game_mechanics;
|
|
|
|
\echo === entfernt ===
|
|
select (select count(*) from public.games where id::text like '9e4f0000-%') as spiele_uebrig,
|
|
(select count(*) from public.publishers where id::text like '9e4f0000-%') as verlage_uebrig,
|
|
(select count(*) from public.catalog_games) as katalogspiele;
|