3 ms·
I've had some append-only tables in Postgres and only recently realised that Postgres' system columns (https://www.postgresql.org/docs/14/ddl-system-columns.htm
by ftdyuio9p0iugy 4y ago
I've had some append-only tables in Postgres and only recently realised that Postgres' system columns (https://www.postgresql.org/docs/14/ddl-system-columns.html https://www.postgresql.org/docs/14/ddl-system-columns.html) already effectively enabled some Datomic-like structure for such append-only tables! Specifically the xmin column allows me to identify the rows to treat atomically as a unit, and to ignore if I'm querying for a historical view.
- packetlost 4y agoYou could probably do it with BRIN indexes similar to how TimescaleDB handles their time-series hypertables
- LoriP 4y agoTimescaleDB is packaged as a postgres extension, there's a GitHub project here if anyone is interested to check in on that https://github.com/timescale/timescaledb https://github.com/timescale/timescaledb
- zresdtfugyihoi 4y agoIndeed! That seems like quite the ideal use-case for BRIN indexes.