1.
Make the pastry: Whisk together the all-purpose flour, whole-wheat pastry flour, salt, and 1 tablespoon granulated sugar. Cut in the cold butter with a pastry cutter or your fingertips until the mixture has pea-size pieces and some larger, flat butter pieces.
2.
Stir the chilled vinegar into 6 tablespoons ice water. Drizzle it over the flour mixture, tossing gently with a fork. Add more ice water, 1 tablespoon at a time, just until the dough holds together when squeezed; avoid kneading.
3.
Divide the dough into two portions, one slightly larger than the other. Shape each into a disk, wrap, and refrigerate for at least 1 hour.
4.
Prepare the filling: Toss the sliced apples with lemon juice in a large bowl. In a small bowl, mix the brown sugar, 2 tablespoons granulated sugar, cinnamon, nutmeg, ginger, and allspice. Toss this mixture with the apples and let stand for 20 minutes.
5.
Strain the apples over a saucepan, reserving the juices. Stir the 2 tablespoons flour into the apples along with the vanilla. Simmer the reserved juices over medium heat for 3 to 5 minutes, stirring, until syrupy. Let the syrup cool slightly, then toss it back with the apples.
6.
Set a rack in the lower third of the oven and place a rimmed baking sheet on it. Heat the oven to 425°F (220°C).
7.
On a lightly floured surface, roll the larger dough disk into a circle about 12 inches wide. Fit it into a 9-inch pie plate without stretching the dough, leaving a slight overhang.
8.
Fill the crust with the apples, arranging them into a compact mound. Drizzle any syrup left in the bowl over the fruit and dot with the tablespoon of butter.
9.
Roll the second dough disk into an 11-inch circle. Lay it over the filling, trim both crusts to about 1 inch beyond the rim, tuck the edges under, and crimp to seal. Cut several vents in the top crust. Alternatively, cut the dough into strips and weave a lattice.
10.
Beat the egg with 1 teaspoon water and brush it over the top crust. Sprinkle with coarse sugar, if using. Chill the assembled pie for 15 minutes while the oven finishes heating.
11.
Set the pie on the preheated baking sheet. Bake for 20 minutes at 425°F (220°C), then reduce the oven to 375°F (190°C) without opening the door. Bake for another 40 to 50 minutes, until the crust is deep golden and the filling bubbles through the vents. Cover the edges with foil if they brown too quickly.
12.
Cool the pie on a rack for at least 3 hours before slicing so the filling can set.