For the filling, melt the butter with the oil in a large non-stick frying pan. Add the onion, celery, carrots and potatoes. Cook over a low heat for about 15 minutes until the vegetables are softened and beginning to colour, stirring regularly. The carrots should retain a little bite.
Add the ketchup and stir into the vegetables for a few seconds before adding the corned beef. Break the beef into chunky pieces with a wooden spoon and mix with the vegetables.
Season with pepper – you shouldn’t need salt as the corned beef is fairly salty – and remove from the heat. Leave to cool for about 20 minutes.
Preheat the oven to 190C/375F/Gas 5.
To make the pastry, put the flour, salt and butter in a food processor and pulse until the mixture resembles breadcrumbs.
Lightly whisk the egg with a tablespoon of cold water in a small bowl. Slowly pour all but one tablespoon of the egg mixture into the food processor with the motor running and blend until the mixture begins to form a ball.
Turn the pastry out onto a well-floured work surface and bring it together into a ball. Take about a third of the pastry, roll it out and use it to line a 23cm/9in pie plate or 20cm/8in round ceramic quiche dish or deep Victoria sandwich tin. Leave any excess pastry overhanging the edge. Brush the pastry edge lightly with the reserved egg.
Spoon the filling into the pastry base and spread it out evenly. Flour the surface once more and roll out the remaining pastry. Lift the rolled pastry over the rolling pin and place gently over the filling. Press the edges firmly together then trim neatly. Seal the edge with a fork.
Brush the top of the pastry with the remaining beaten egg, cut a cross in the centre of the pie and place onto a baking tray. Bake for about 40 minutes or until the pastry is golden-brown and the filling is piping hot.