For the dough, mix flour with salt and vanilla sugar on a work surface. Make a well in the center of the flour. Whisk egg yolks with water and place in the well. Add butter in pieces over the flour. Chop with a large knife, so that the dry ingredients mix with the wet ingredients. Then quickly knead to a smooth dough. Wrap in plastic wrap and place in the refrigerator for 30 minutes.
For the filling, halve, seed and peel the pears. Sprinkle pears with lemon juice. Heat butter in a pan. Stir in sugar and cook until caramelized.
Add pears and briefly cook, tossing to coat. Transfer pears to an oven-proof dish (26-28 cm diameter/approximately 10-11 inches) with the cut side down. Pour the cooking liquid over pears. Sprinkle with pistachios. Roll out the dough on a lightly floured work surface. Place over the pears and seal the edges. Trim overlapping edges and roll dough into a cord shape. Press dough cord around the edge of dish. Whisk egg yolk and brush the dough with it. Bake in preheated oven at 200°C (gas mark 3, convection 180°C) (approximately 400°F/convection 350°F) for 35-40 minutes.