News for hackers. Stuff that matters.
Re:Just use Postgres for everything by kolar on Saturday December 10, 2022 @01:57PM (#33935572)
Be careful when using Postgres as queue with priorites, especially if your messages are large. Removing rows doesn't free up the memory in Postgres and vacuum could remove rows only from the end of a 'page'. As a result of that queue will require enormous amount of space to work. The only way to free up space is to use VACUUM FULL which rewrites whole database and will lock queue for long time. I've had a lot of headaches when we've tried 'use Postgres for everything' on production :)
Re:Just use Postgres for everything by kolar on Saturday December 10, 2022 @02:12PM (#33935738)
Also Postgres is too slow for large analytical databases. You need columnar database to make fast queries on >1Tb of data.
Re:Just use Postgres for everything by martintietz on Saturday December 10, 2022 @05:05PM (#33937383)
As always: it depends. For some workloads something like Citus [1] might allow you stay within the PostgreSQL ecosystem even when you are trying to do OLAP.

[1] https://github.com/citusdata/citus

Re:Just use Postgres for everything by ttfkam on Saturday December 10, 2022 @07:36PM (#33938656)
1TB is peanuts. You can usually get by even with a lot more. Once that's expired though, you can just switch relatively easily to a different flavor of Postgres.

It's why AWS Redshift exists: Postgres with column-oriented storage.

Re:Just use Postgres for everything by ithkuil on Saturday December 10, 2022 @02:19PM (#33935802)
Does anyone have experience with some postgres columnar store extension like https://github.com/citusdata/cstore_fdw ?
Re:Just use Postgres for everything by whoopdeepoo on Saturday December 10, 2022 @03:02PM (#33936245)
My experience was not enough support for common postgres features
Re:Just use Postgres for everything by martintietz on Saturday December 10, 2022 @04:55PM (#33937278)
Agree. Here is a list of the limitations: https://github.com/citusdata/citus/tree/main/src/backend/col...
Re:Just use Postgres for everything by ttfkam on Saturday December 10, 2022 @07:37PM (#33938659)
AWS Redshift works wonderfully in that capacity.
Re:Just use Postgres for everything by bfelbo on Sunday December 11, 2022 @02:12PM (#33946380)
You could use TimescaleDB which is a Postgres extension that adds support for columnar tables and time-based chunking. Works brilliantly IMO.
Re:Just use Postgres for everything by fuy on Sunday December 11, 2022 @03:42AM (#33941413)
there's also things like pg_repack which don't lock the tables (but will incur high IO while freeing up the space).