Cook the potatoes with the carrots in a medium pot just until tender, 20-30 min, depending on the size of the vegetables. Cook the vegetables in their skins. Do not overcook.
Hardboil the eggs.
Drain the peas well.
Cut the potatoes, carrots, eggs, pickles and cucumbers, if using, into small ¼ inch dice.
Mince the onions finely, if using. (I don't like raw onions, so I never put them in. Another option is to use chives or green onions.)
Mix all the the ingredients with the mayonnaise.