News for hackers. Stuff that matters.
Re:Postgres scaling advice by jandrewrogers on Tuesday January 26, 2021 @11:51AM (#25918055)
It is ironic that you accuse me of "unwarranted conclusions". I've been customizing and modifying PostgreSQL internals for almost two decades, I know how to read the source. You aren't as familiar with PostgreSQL as you think you are.

This wasn't my problem, I was asked by a well-known company with many large PG installations and enterprise support contracts to look at the issue because no one else could figure it out. The limitations of the statistics collector are not only evident in the source but they are documented there. There are also deep architectural reasons why you can't trivially modify the statistics collector -- I looked into this option -- to work for larger tables without introducing other serious issues.

If you have a uniform distribution of values, the statistics collector will work fine. In the above case, the values followed a power law distribution which created extreme biases in the statistical model due to necessary restrictions on sampling. Other distributions can have similar effects once you exceed the ability of the statistics collector to acquire a representative sample.

Re:Postgres scaling advice by brasetvik on Tuesday January 26, 2021 @12:38PM (#25918786)
> I know how to read the source. You aren't as familiar with PostgreSQL as you think you are.

Oh, maybe you have read some of Laurenz Albe's many contributions to Postgres, then. https://git.postgresql.org/gitweb/?p=postgresql.git&a=search...

Re:Postgres scaling advice by syspec on Tuesday January 26, 2021 @08:08PM (#25923016)
murdered by words
Re:Postgres scaling advice by bobthebuilders on Tuesday January 26, 2021 @07:36PM (#25922801)
Nice deepfake. It's so surprising how far the field has gone. I re never seeing the fake Nixon moon speech and being blown away
Re:Postgres scaling advice by srcreigh on Tuesday January 26, 2021 @03:56PM (#25920954)
Naive question. Wouldn't sampling a power law dataset be straightforward? The idea is there's only a few outlier values, and the rest are uncommon. This distribution seems extremely common. Ie column with mostly NULL values and the rest somewhat unique non null strings.

I'm curious what data you saw and why the sampling didn't work?

Re:Postgres scaling advice by ldng on Tuesday January 26, 2021 @06:19PM (#25922212)
I'm curious, will he answered given his vested interest in "exabyte-scale analytical database" ? :-)

And laurenz_albe has a vested interest in PG as he's a contributor.

So I, too, would love more concrete details.

Re:Postgres scaling advice by kikimora on Wednesday January 27, 2021 @02:09AM (#25925200)
I think the problem is PG does not know underlying data distribution and use one sampling strategy which works for normally distributed data.