It would be best if you can rehome, that way you can ask the rescue if the dog is OK around small animals. If you buy from a breeder it'll be nurture/nature and can go either way, so you must be prepared to make arrangements (piggies securely away from a dog in a room dog can't get to).
You can do "scent swaps" before bringing new dog in, to give everyone chance to prepare before the new addition arrives.
I have multi pet household and my dog is a terrier and fostered many others. My piggies are good around other animals and don't get stressed. My dog is good with them when I am around and leaves them alone if they're in the run on the garden. My dog just wants to take their veg away
I can't count how many times I was cleaning the cage and when I turned around my dog was running away with pepper in her mouth!
I had a foster dog who I had since pup and she was amazing with the pigs. They would popcorn when she would play bow and would lick their faces (they would push their faces towards bars!). Especially one of my boys LOVED her! She was then rehomed to live with indoor rabbit.
But I wouldn't leave them unattended. Make sure they cannot escape. Only one time my cats and dog reacted to a piggie was when I had a stunted young piggie, he looked and moved like a rat. Once he grew up, they all lost interest.
I have c&c which is raised off the floor and has a lid on it.
Don't give the dog a chance, make sure doors are closed (put baby gate/Pet gate on the stairs) and never leave them unattended. It takes a second for disaster to happen...