Initial Siphon test plan on staging
Overview
This issue tracks the initial test plan for running Siphon on the GitLab staging environment. The goal is to validate snapshot creation and logical replication message processing.
Configuration Steps
- Configure Siphon producer with PostgreSQL credentials and hostname(s).
- Set
initial_data_snapshot_threads_per_tableto3. - Configure table mapping:
-
bulk_import_entities(small table)
-
- Ensure Siphon producer logs are preserved for post-test analysis.
Execution Steps
Note: these steps shouldn't affect deployments/DB migrations
- Start the Siphon producer.
- Verify that snapshots are being taken.
- Verify logical replication messages are being processed.
- Keep it running until snapshots complete, plus a few additional minutes.
- Re-configure Siphon producer and add a new table:
-
projects(small table)
-
- Restart Siphon producer and do steps 2-4 again.
Monitor DB health
Check replication lag:
SELECT
slot_name,
ROUND(
pg_wal_lsn_diff(pg_current_wal_lsn(), confirmed_flush_lsn) / 1024.0 / 1024.0,
2
) AS lag_mb
FROM pg_replication_slots
WHERE slot_name = 'stg_main_siphon_slot_1';
Teardown Steps
- Drop the logical replication slot (publication remains), so WAL files are not accumulating.
SELECT pg_drop_replication_slot('stg_main_siphon_slot_1');
Edited by Adam Hegyi