If you have enough time to deal with both then personally I think small children and dogs can work well, BUT you have to be prepared to put in a lot of training time for that first year.
Get a smallish dog. definitely not a lab or GS and FGS NOT a boxer (fighting breed and the most difficult dog I ever owned) or a highly strung breed like a visla. I have mini poodles, but there are lots of suitable breeds around that size. If the dog ever snaps the risk is much lower.
Socialise them from day 1. Lots of handling, experience of other children etc. You want them to expect to be pulled around a bit.
Never ever let them be dominant. I have friends who ruined a lovely dog by letting him colonise the sofa. He snaps at them now if they try to sit down. None of our mutual friends want to go to their house because he is so unnerving.
Your dog needs to know he is bottom of the food chain. You have the right to take his food bowl when he is eating, hold his collar, make him wait to be invited on furniture, put up with his ears being lifted and paws squeezed (good training for the vets) and make him sit and wait. Never let him growl or snap without a darn good telling off and ideally grab his muzzle and stare him down while you tell him off. Then send him off to be on his own for half an hour - the worst punishment possible for most dogs.
Contrary to what people say, that makes for a very happy, secure dog. He know where he stands and that he does not have to be dominant or protect anyone. I have three dogs who are regularly used to introduce small children to dogs, including at school, exactly because they are so safe and reliable. They get picked up, turned upside down, have children hold their ears and tails and they accept it all. I'd say they are as near as you can get to childproof.
BUT, I agree with the posters who say, they are living creatures and your dog and toddler should not be left alone together until your DC is older.
Growing up with a dog is a very special bond which children remember for ever, but you will need to work hard in the early days to make sure the relationship works.