Live data from Hacker News

PostgreSQL 16 Beta 1

postgresql.org

21–30 of 62 posts

Re: PostgreSQL 16 Beta 1

#21
My list of unexpected but very welcome changes:

- pg_hba.conf and pg_ident.conf can include other files

- Logical replication apply can use non-PK btree indexes

- Integer literals in non-decimal bases

- Underscores in numeric literals

- Subqueries in the FROM clause can omit aliases

- Addition and subtraction of timestamptz values

- pg_upgrade can override new cluster's locale and encoding

Re: PostgreSQL 16 Beta 1

#22
post #18
post #10

Earlier quoted context omitted.

Could you elaborate on the load balancing? Is this a replacement for PG bouncer and similar?

IMO the biggest reason folks use pgbouncer is not for load balancing (which it can do, -ish) but instead for connection pooling. Postgres connections are expensive for the db server (one process per connection not one thread) so if you have say thousands of web application pods you need to use pgbouncer or similar as a proxy to multiplex those thousands of connections down onto a more manageable number (~200). So no,…

Out of curiosity, if the problem of connections being expensive is solvable by PGBouncer-style connection multiplexing, why doesn't Postgres just do that by itself?

Re: PostgreSQL 16 Beta 1

#23
post #15
post #8

[flagged]

It can be. We still running PG11 and 13 in production. Not obligated to upgrade - especially when the software is rock solid.

PG 11 is end-of-life, right? So you won't be getting new security updates. What's worse, libraries will stop supporting it over time, so you'll find it difficult to stay up to date in other places in your stack.

If I was running PG 11 in production, I'd be looking to upgrade sooner rather than later. Being on older-but-stable versions is good risk management, being on end-of-life version is not.

Re: PostgreSQL 16 Beta 1

#24
post #15

Earlier quoted context omitted.

It can be. We still running PG11 and 13 in production. Not obligated to upgrade - especially when the software is rock solid.

PG 11 is end-of-life, right? So you won't be getting new security updates. What's worse, libraries will stop supporting it over time, so you'll find it difficult to stay up to date in other places in your stack. If I was running PG 11 in production, I'd be looking to upgrade sooner rather than later. Being on older-but-stable versions is good risk management, being on end-of-life version is not.

> PG 11 is end-of-life, right? So you won't be getting new security updates.

Not quite yet https://www.postgresql.org/support/versioning/ - the final release will be November 9, 2023.

Re: PostgreSQL 16 Beta 1

#25
post #15

Earlier quoted context omitted.

It can be. We still running PG11 and 13 in production. Not obligated to upgrade - especially when the software is rock solid.

PG 11 is end-of-life, right? So you won't be getting new security updates. What's worse, libraries will stop supporting it over time, so you'll find it difficult to stay up to date in other places in your stack. If I was running PG 11 in production, I'd be looking to upgrade sooner rather than later. Being on older-but-stable versions is good risk management, being on end-of-life version is not.

We roll onto new stuff. So soon-ish the 11 will be replaced with a 14 or 15. And then later the 13 will roll up to whatever is good, stable and tested in our environment. And our roll-up plan has never seen an old PG lose client library access. PG has never ever, in 20+ years been the thing that holds us back. I also think risk-management has many more (important) factors than EOL.

Edit: quick check shows we also have PG9 and PG10 in some Live roles too.

Re: PostgreSQL 16 Beta 1

#26

My list of unexpected but very welcome changes: - pg_hba.conf and pg_ident.conf can include other files - Logical replication apply can use non-PK btree indexes - Integer literals in non-decimal bases - Underscores in numeric literals - Subqueries in the FROM clause can omit aliases - Addition and subtraction of timestamptz values - pg_upgrade can override new cluster's locale and encoding

Not a bad list!

https://commitfest.postgresql.org/19/1741/ (index skip scan/loose index scans) would be very welcomed... I think. Not sure how many people run into it in the wild.

It says "target version: 16" but "returned with feedback" and hasn't been bumped in 14 months. :( First opened in 2018.

https://wiki.postgresql.org/wiki/Loose_indexscan

Re: PostgreSQL 16 Beta 1

#27

Postgresql is amazing but I must say the last few updates have been a bit disappointing. Still waiting for automatic incremental updates for materialized views - been worked on for several years but still not released! https://wiki.postgresql.org/wiki/Incremental_View_Maintenanc... https://github.com/sraoss/pg_ivm

I have one use case where this functionality would be huge in terms of performance, patiently waiting for it

Re: PostgreSQL 16 Beta 1

#28
Bunch of interesting loosenings ups on logical replication. Allowing standbys to also have subscribers; great for fan out! Bunch of perf improvements (honestly a bunch of it is removing rather onerous limitations I didn't know about!) At the end there seems to be a developer flag for allowing seeming bidirectional replication too.

Re: PostgreSQL 16 Beta 1

#29
post #18

Earlier quoted context omitted.

IMO the biggest reason folks use pgbouncer is not for load balancing (which it can do, -ish) but instead for connection pooling. Postgres connections are expensive for the db server (one process per connection not one thread) so if you have say thousands of web application pods you need to use pgbouncer or similar as a proxy to multiplex those thousands of connections down onto a more manageable number (~200). So no,…

Out of curiosity, if the problem of connections being expensive is solvable by PGBouncer-style connection multiplexing, why doesn't Postgres just do that by itself?

Because pgbouncer's transaction-based pooling, which is what the previous poster was referring to, breaks a few postgres features. This is fine for most applications, but not all. See the table on https://www.pgbouncer.org/features.html

Re: PostgreSQL 16 Beta 1

#30

My list of unexpected but very welcome changes: - pg_hba.conf and pg_ident.conf can include other files - Logical replication apply can use non-PK btree indexes - Integer literals in non-decimal bases - Underscores in numeric literals - Subqueries in the FROM clause can omit aliases - Addition and subtraction of timestamptz values - pg_upgrade can override new cluster's locale and encoding

> - Subqueries in the FROM clause can omit aliases

This is great. It never made any sense to me that this was required. For people who are unaware, say you want to understand a table a natural way of doing it might be

    select * 
    from the_table
    order by some_metric desc 
    limit 10
so you'd think you can do the same for queries like

    select * 
    from (
      select blah blah blah the rest of the query
    ) a
    order by some_metric desc 
    limit 10
you need to put the alias 'a' to placate existing postgres even though it's never actually used, which never made any sense to me.
Post reply on HN