If using fresh octopus, freeze it for a few days. Thaw it in the refrigerator for 18–24 hours, or at room temperature for 6–8 hours.
Bring water to a boil in a pot. Add the octopus and cook it at a bare simmer for 30 minutes.
Remove the octopus, let it cool, and cut it into 3/4- to 1 1/4-inch (2–3 cm), bite-size pieces. Set the cooking liquid aside.
Finely chop the onion and garlic.
Heat a large pot, add the olive oil and onion. Sauté the onion over medium heat until translucent. Then add the garlic and cook for another half minute.
Add the canned tomatoes, olives, capers, tomato paste, and the herbs and seasonings—thyme, marjoram, parsley, and lemon zest. Pour in the wine, add the water or octopus cooking liquid, and bring everything to a boil.
Add the octopus and cook over low heat for 30 minutes.
Meanwhile, peel the potatoes and cut them into larger cubes. Add them to the octopus along with the green peas, and once it comes back to a boil, cook for another 25–30 minutes, until the potatoes are tender.