Re: PG 18 release notes draft committed

amit <amitlangote09@gmail.com>

From: Amit Langote <amitlangote09@gmail.com>
To: Bruce Momjian <bruce@momjian.us>
Cc: PostgreSQL-development <pgsql-hackers@lists.postgresql.org>, David Rowley <dgrowleyml@gmail.com>
Date: 2025-05-06T06:08:13Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. doc PG 18 relnotes: add AFTER trigger user change item

  2. doc PG 18 relnotes: modify async I/O item for other improvements

  3. doc PG 18 relnotes: split apart log_connections item

  4. doc PG 18 relnotes: move ANALYZE item,split ANALYZE/EXPLAIN item

  5. doc PG 18 relnotes: clarify multiplication item

  6. doc PG 18 relnotes: add removal details to MD5 item

  7. doc PG 18 relnotes: fix markup

  8. doc PG 18 relnotes: clarify btree skip-scan item

  9. doc PG 18 relnotes: update to current

  10. doc PG 18 relnotes: adjust CREATE SUBSCRIPTION attribution

  11. doc PG 18 relnotes: clarify btree skip scan item

  12. doc PG 18 relnotes: mv. hash joins and GROUP BY item to General

  13. Add support for runtime arguments in injection points

  14. doc PG 18 relnotes: fix missing parens for crc32c()

  15. PG 18 relnotes: adjust RETURNING new/old item

  16. doc PG 18 relnotes: adjust pg_log_backend_memory_contexts()

  17. doc PG 18 relnotes: add pg_log_backend_memory_contexts() mention

  18. doc PG 18 relnotes: adjust pgbench per-script reporting item

  19. doc PG 18 relnotes: mention GROUP SET fixes

  20. doc PG 18 relnotes: adjust partition planning item

  21. doc PG 18 relnotes: small adjustments regarding options

  22. doc PG 18 relnotes: move partition locking item to General Perf

  23. doc PG 18 relnotes: adjust partition items

  24. doc PG 18 relnotes: reword OAuth item

  25. doc PG 18 relnotes: add mention of pg_stat_reset_backend_stats()

  26. doc PG 18 relnotes: adjust hash item

  27. doc PG 18 relnotes: split partition optimizer item into two

  28. doc PG 18 relnotes: adjust COPY and REJECT_LIMIT items

  29. doc PG 18 relnotes: move and clarify constraint items

  30. doc PG 18 relnotes: add commit for cancel key and protocol neg.

  31. doc PG 18 relnotes: fix libpq wording

  32. doc PG 18 relnotes: add GROUP BY column elimination item

  33. doc PG 18 relnotes: move protocol version item to "server"

  34. doc PG 18 relnotes: adjust libpq trace & potocol version items

  35. doc PG 18 relnotes: reword and reorder items

  36. doc: Fix memory context level in pg_log_backend_memory_contexts() example.

  37. Make levels 1-based in pg_log_backend_memory_contexts()

  38. Introduce file_copy_method setting.

  39. libpq: Handle NegotiateProtocolVersion message differently

  40. Add timingsafe_bcmp(), for constant-time memory comparison

  41. Optimization for lower(), upper(), casefold() functions.

  42. Fix ALTER SUBSCRIPTION ... SET PUBLICATION ... command.

  43. Add connection establishment duration logging

  44. Modularize log_connections output

  45. Ensure that AFTER triggers run as the instigating user.

  46. Detect redundant GROUP BY columns using UNIQUE indexes

  47. Move cancel key generation to after forking the backend

On Sat, May 3, 2025 at 1:18 AM Bruce Momjian <bruce@momjian.us> wrote:
> On Fri, May  2, 2025 at 01:00:57PM +0900, Amit Langote wrote:
> > 1. Speed up execution of cached plans by deferring locks on partitions
> > subject to pruning (Amit Langote)
> > (bb3ec16e1, d47cbf474, cbc127917, 525392d57)
> >
> > 2. Speed up child EquivalenceMember lookup in planner (Yuya Watari,
> > David Rowley)
> > (d69d45a5a)
> >
> > 3. Speed up derived clause lookup in EquivalenceClass (Ashutosh Bapat)
> > (88f55bc97)
> >
> > Alternatively, 2 and 3 can be combined as:
> >
> > 2. Speed up partition planning by improving EquivalenceClass lookups
> > (Yuya Watari, David Rowley, Ashutosh Bapat)
> >
> > I think 1 should go under Partitioning, which I see is currently missing.
> >
> > Any thoughts, David?
> >
> > Can work on a patch if you'd like.
>
> So, a few things.  First, these set of commits was in a group of 10 that
> I added since there have been complaints in the past that optimizer
> improvements were not listed and therefore patch authors were not given
> sufficient credit.  That means the 209 item count for PG 18 is 10 higher
> than my normal filtering would produce.
>
> Second, looking at the items, these are a case of "X is faster", which
> we don't normally mention in the release notes.  We normally mention
> "faster" when it is so much faster that use cases which were not
> possible before might be possible now, so it is recommended to retest.
> That is what I saw this grouped item as, whereas I don't think the
> individual items meet that criteria.
>
> Also, I didn't see enough partition items to warrant a separate
> partition section, and we didn't have one in PG 17 either.  We could
> pull all the partition items from the sections they are already in, but
> they seem more natural in the sections they are in.
>
> I don't think most people would know what EquivalenceMember is, and even
> if they did, would they be able to connect it to an SQL query?

Thanks for splitting these (cf847d634). I think the text for the
locking item should mention “during execution,” as David also
suggested. Again, I don’t think this change belongs under Optimizer
since it doesn’t really affect the planner -- it’s mainly an executor
improvement. Maybe the General Performance section is a better fit.

Also, just to clarify why the individual items are meaningful
performance improvements:

* Locking change: Executing cached plans involving hundreds or
thousands of partitions was bottlenecked by locking; with this change,
execution is now roughly 20x faster with 1000 partitions.

* Planning time improvements: Planning certain commonly used queries
against partitioned tables when they don’t use partition pruning is
now roughly 20x faster with 1000 partitions.

-- 
Thanks, Amit Langote