Without this built-in feature, I'd have used filesystem snapshots, if I didn't mind the time it'd take to stop and start Pg.
----
1: https://www.postgresql.org/docs/current/manage-ag-templatedb...