Postgres looped table (start sequence from 1 and rewrite old rows)
you could just use a monotonic sequence (always counting upwards) and delete records based on their age
you could do table partitioning by date and just drop the old partitions
Postgresql never replaces records, an update always creates a new record and marks the old one as unused. Autovacuum sooner or later will make the space used by the old one available to hold new records.  If you want something like RRDB your should probably be using somethign like RRDB instead of postgresql.