I have had dogs with guinea pigs for about 20 years and also volunteer for a local dog rescue so I can confirm that rescues will take into account all factors when matching the right dog, e.g. they may recommend that a sighthound or terrier would not be a good match for your circumstances.
Having said that, breed-wise there are always exceptions to the rule. I have fostered a lurcher who was scared of them and my previous dog was a whippet cross who was laid back and couldn’t care less about other animals. She never tried to go near them and was only interested in the poops on the floor around the cage, which she saw as a very tasty snack! However my current dog is very much stereotype-she is an ex-traveller’s Jack Russell who has likely been used for hunting and sees all small things as prey.
To maintain safety for all, the pigs’ cages are raised on tables with no nearby furniture/clutter so dog can clamber up and gain access, they are never left in the same room alone and when the pigs have run time, the dog is shut outside the garden (I have garden/patio areas separated by secure wrought iron fence/gate). I also use a secure carrier to transport, rather than carry them and never handle the pigs when the dog is near-a wriggle and fall would be disastrous! However, she has become much calmer around them over the years and although I would never trust her with them, she will now ignore the exciting noises of their popcorns (which used to stir her to a frenzy) and sit calmly on the sofa watching through the baby gate whilst I am carrying out my guinea duties.
Having dogs and other animals is entirely possible as long as consideration goes into the matches and precautions are taken. Over the years I have had mice, rats, gerbils, guinea pigs and rabbits with my dogs. I love my small furries but I also love being in the great outdoors and wouldn’t be without a dog either. The combination of animals is the best of both worlds. Good luck x
Ps. attached is a pic of my indoor dog-safe set up.