BS-7099 : Fix test for Postgres on BOS and BOS-SP

- Rewrite random test