I'll do my best to be polite here!!!
I'm a bit of a nosey know it all when it comes to dogs. I've more or less had them in my life in one way or another. A dog and a bird in a house can be a bit of a difficult experience. The thing with dogs is that no matter how well they are trained and disciplined, they can "snap" in the presence of a bird and kind of just attack it. More than often they do this in a "playful" manner, not with the intention of harming them. However, dogs can underestimate their own strength and sudden kicks of instinct and end up injuring a parrot. Naturally, without MEANING to do so - this has happened with the most sweetest and obedient dogs.
Essentially, dogs are predator animals, while parrots are prey. Dogs can sometimes have that tiny instinct kick in and go "ITS A THING! I WANNA CHASE IT AND BITE IT! YEAH" and go and attack the bird without, as I said earlier, with the intent to harm it. My sister owns a Finnish Lapphund and everytime he comes for a visit, we don't let Simo out of his cage. They have a herding instinct of sorts and we don't really trust him around Simo when he's free. That having said I must mention that Simo loves to throw stuff at him from his cage and purposefully wakes him up from naps XD.
I keep repeating the phrase "I'M NEW HERE, I DON'T KNOW MUCH". This is the case with this opinion too, but I base it on my experience with dogs. If you do decide to get a dog, and you do let your parrots be free, ALWAYS, and ALWAYS be present when they are in the same space. Even if they are perched higher and out of the dog's reach. Make sure you don't leave them alone, even for a second.
I've heard many a sad story where a genuinely sweet puppy jumped an african grey because instinct simply kicked in. Some dogs have that instinct to a lesser degree, it's true - but they still have it. Please be very, very very cautious if you do get a dog. You could also simply keep them apart if you have doors and gates. Make sure the dogs are in a certain part of a house and the parrots in their own place.
Ultimately I have to be honest and say that the idea is a bit iffyish to me, but if you make sure they both don't have access to each other's places, it could perhaps, work out?
A cautionary tale (though it features no bird): I once took the doggy for a walk - and he saw a squirrel. He bolted with such incredible momentum that he pulled me with it, causing me to misstep and literally bending my foot in half from the force. And this is a puppy who is admittedly extremely dumb, and hardly EVER chases anything, birds or cats or squirrels. But something just snapped in his pea brain and caused him to bolt.

I would have NEVER in a million years expected this - my sister, his owner, was also amazed when I told the story. He's never done anything like it before.
Summa summarum: even if a dog is ultra trustworthy like that, the remnants of instinct may kick in when you least expect it. (never for humans - but for small animals like that. especially terriers and herding dogs.) So uh... yeah! Just be careful, I'd say?