\pset pager off
\timing on

select now() at time zone 'utc' as validation_started_utc;
select version();
select pg_is_in_recovery() as is_replica;
select current_database(), current_user;

select count(*) as table_count
from information_schema.tables
where table_schema not in ('pg_catalog', 'information_schema');

select
  schemaname,
  relname,
  n_live_tup,
  n_dead_tup,
  last_autovacuum,
  last_analyze
from pg_stat_user_tables
order by n_live_tup desc
limit 25;

select
  schemaname,
  sequencename,
  last_value
from pg_sequences
order by schemaname, sequencename
limit 100;

-- Add domain-specific checks here:
-- 1. Count recent business records around the recovery target.
-- 2. Verify foreign-key and uniqueness expectations.
-- 3. Run the critical transaction through the application.
