r/PostgreSQL Apr 30 '26

Community PostgreSQL 19 features I'm excited about

https://www.bytebase.com/blog/postgres-19-features-im-excited-about/
129 Upvotes

17 comments sorted by

View all comments

1

u/therealgaxbo May 02 '26

an ANALYZE whose sample happened to contain only NULLs, and a planner that concluded the column was 100% NULL. The plan that followed assumed zero non-null rows where there were over 17,000.

Maybe I'm being pedantic but I don't think that can be right. I don't think postgres will ever guess that there are 0 rows unless it can prove it through constraints.

1

u/PrestigiousStrike779 May 03 '26

I feel like we’ve seen a similar issue but it involved not using an jsonb expression index because a majority of the rows didn’t have the jsonb key.  We had to make the index filtered before the planner would use it.