Preheat oven to 400° F with a rack in the lower third of the oven.
Make the pie crust: Place the flour, granulated sugar and salt in the bowl of a food processor fitted with the steel blade. (Alternatively, the pie dough can be mixed by hand in a bowl using a pastry cutter.) Pulse a few times to combine.
Add the cold butter cubes and pulse 10-12 times, until the butter pieces are the size of small peas.
Add the ice-cold water and pulse until the dough starts to come together.
Turn the dough out onto a lightly floured work surface and cut it in half. Form each half into a round disk. Refrigerate one disk.
Use a rolling pin to roll the second dough disk out into a circle that is 12 inches in diameter. Turn the dough a quarter turn with each roll as you roll it out. Place dough circle into a 9x2-inch pie dish. (Gently wrap dough around the rolling pin to transfer it.) Gently smooth the dough out into the pie dish, but do not press it down firmly into the dish as this can cause the crust to stick. Place in the refrigerator while you prepare the pie filling.
Make the blackberry pie filling: If using fresh blackberries, wash the blackberries and lay them out on a clean towel; gently pat dry. If using frozen blackberries, allow them to fully thaw and drain off any excess liquid.
Place blackberries in a large bowl. Add the sugar, cornstarch, lemon juice and vanilla and stir until well combined. Let the filling mixture rest for 5-10 minutes so that the berries release some of their juices. Then stir again to make sure that everything is well distributed. Transfer the blackberries and any juices from the bowl to the pie dish with the rolled out pie crust. Set aside.
Roll out the top pie crust: Place the second dough disk onto a lightly floured work surface. Roll it out into a 12-inch diameter circle. Use a sharp knife, pizza cutter or pastry wheel to cut the dough circle into ½-inch strips. Using every other strip from the circle, arrange half of the dough strips going one direction across the top of the pie, leaving a little bit of space in between each strip. Weave the other half of the dough strips through the first set, over and under, pulling back the first set of strips as needed to weave. (As an alternative to the lattice crust, you can place the whole dough round on top of the pie. Cut a few slits in the center to allow steam to escape.)
Trim off excess dough around the edge of the pie. Fold the edge over, towards the inside, and crimp with your fingers or a fork.
In a small bowl, beat the egg and the 1 tablespoon milk or water. Lightly brush the top pie crust with the egg mixture. (You won't use all of the egg mixture.)
Bake pie at 400° F for 15 minutes, then reduce the oven temperature to 350° F and continue baking for 45-50 more minutes, until the filling is bubbly and crust is light golden brown. Begin checking on the pie at 30 minutes and cover crust edges with pieces of foil as needed to prevent over-browning (you may use pie crust shields in place of the foil).
Let pie cool for at least 2-3 hours at room temperature before slicing and serving. Store leftover pie in the refrigerator, wrapped tightly, for up to 5 days.