In a large bowl, whisk together your all-purpose flour, sugar and salt.
Add your cold butter pieces to the flour mixture. Work the butter into the flour until you have coarse crumbs, like small peas.
Add your active sourdough starter (or sourdough discard) and mix gently until the dough starts to come together. You want the dough to hold together when pinched but not be sticky.
On a lightly floured work surface, gather the dough into a rough ball.
Divide the pastry dough in half.
Wrap each portion tightly in a piece of plastic wrap or slide into a freezer bag. Chill for at least 1 hour, or up to 3 days.
When ready to bake, let the wrapped dough rest at room temperature for 5–10 minutes so it softens slightly. On a floured surface, roll the dough into a 12-inch circle. Use quarter turns as you roll to prevent sticking. Transfer to your pie plate or pie pan, gently pressing into the bottom and sides.
Trim any excess dough, fold edges under, and crimp as desired.
Brush with egg wash for glossy finish (optional)
If you’re baking a pie with filling that bakes along with the crust (like apple pie, chicken pot pie, or any double-crust pie), follow the baking directions for that recipe.