Are there open source RDBMS that support non-backup snapshots? I'm not looking for point-in-time backups but some kind of "time machine" read-only functionality.

For example when running a SELECT query I would like to tell the database to run it on the data as it was, say, 1 month ago. Snapshots granularity could go from on-demand to taking a snapshot after each transaction.

Ideally it would be possible also to purge data on-demand, something like "stop storing snapshots older than 10 days".
Arkhipov's extension for PostgreSQL enables Temporal Tables.

https://pgxn.org/dist/temporal_tables/

Here's a decent guide for using it: http://clarkdave.net/2015/02/historical-records-with-postgresql-and-temporal-tables-and-sql-2011/

PostgreSQL is uniquely suited to this task due to the way it implements row updates.