table_a
and table_b
.SELECT * FROM table_b WHERE id = <value_from_error_message>;
SELECT * FROM pg_stat_activity WHERE query LIKE '%ALTER TABLE%';
table_b
) so that the foreign key constraint is satisfied:INSERT INTO table_b (id, ...) VALUES (<expected_value>, ...);
(Perfect for DevOps & SREs)
(Perfect for DevOps & SREs)