Fill a large saucepan with water, add the onion, carrot, celery and bay leaf and bring to a boil. Add the octopus and simmer over moderate heat for 1 hour, until tender. Let the octopus cool in the liquid, then drain. Using a paper towel, wipe the purple skin off the tentacles, leaving the suckers intact. Cut the tentacles into 1-inch pieces.
Meanwhile, in a saucepan of boiling salted water, cook the green beans until tender, 5 minutes. Using a slotted spoon, transfer the beans to a plate and pat dry. Add the potatoes to the boiling water and cook until tender, 25 minutes. Let cool slightly, then peel and dice the potatoes.
In a large bowl, combine the octopus with the potatoes, green beans, garlic, parsley and olive oil and season with salt and pepper. Serve warm or at room temperature.