Any of the solutions proposed above will work; it really depends on your workload and the size of the dataset.
If you have a lot of records, and you just need a historical archive for reference, you can also think about moving the "old / earlier" versions from the database and instead store them on disk in some sort of linked list format (for example, insert the version containing the address of the previous version, and therefore forming a linked list) and just keep the pointer to the latest version in the database.
There are pros and cons with this approach, but one plus - you can keep your database small and just read old versions from disk. Your old versions should be immutable, so you won’t need to rely on transactional / concurrency support from the database. If your “current / current” dataset is, say, 100G, and your past versions are 900G, then you can put the database on RAID in 100G and put the past versions on cheaper storage and copy several (they are atomic, so when replicating no concurrency problems).
source share